ok

Mini Shell

Direktori : /lib64/python3.6/lib2to3/fixes/__pycache__/
Upload File :
Current File : //lib64/python3.6/lib2to3/fixes/__pycache__/fix_set_literal.cpython-36.pyc

3


 \��@s:dZddlmZmZddlmZmZGdd�dej�ZdS)z:
Optional fixer to transform set() calls to set literals.
�)�
fixer_base�pytree)�token�symsc@s eZdZdZdZdZdd�ZdS)�
FixSetLiteralTajpower< 'set' trailer< '('
                     (atom=atom< '[' (items=listmaker< any ((',' any)* [',']) >
                                |
                                single=any) ']' >
                     |
                     atom< '(' items=testlist_gexp< any ((',' any)* [',']) > ')' >
                     )
                     ')' > >
              c	Cs�|jd�}|r2tjtj|j�g�}|j|�|}n|d}tjtj	d�g}|j
dd�|jD��|jtjtj
d��|jj|d
_tjtj|�}|j|_t|j�dkr�|jd	}|j�|j|jd_|S)N�single�items�{css|]}|j�VqdS)N)�clone)�.0�n�r
�5/usr/lib64/python3.6/lib2to3/fixes/fix_set_literal.py�	<genexpr>'sz*FixSetLiteral.transform.<locals>.<genexpr>�}������r)�getrZNoderZ	listmakerr
�replaceZLeafr�LBRACE�extendZchildren�append�RBRACEZnext_sibling�prefixZdictsetmaker�len�remove)	�selfZnodeZresultsrZfaker�literalZmakerrr
r
r�	transforms"


zFixSetLiteral.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNr r
r
r
rrs
rN)	�__doc__Zlib2to3rrZlib2to3.fixer_utilrrZBaseFixrr
r
r
r�<module>s

Zerion Mini Shell 1.0