AlkantarClanX12

Your IP : 3.149.24.145


Current Path : /opt/alt/python34/lib64/python3.4/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/lib2to3/fixes/__pycache__/fix_unicode.cpython-34.pyc

�
j f��@sWdZddlmZddlmZidd6dd6ZGdd	�d	ej�Zd
S)z�Fixer for unicode.

* Changes unicode to str and unichr to chr.

* If "...\u..." is not unicode literal change it into "...\\u...".

* Change u"..." into "...".

�)�token)�
fixer_base�chrZunichr�strZunicodecs:eZdZdZdZ�fdd�Zdd�Z�S)�
FixUnicodeTzSTRING | 'unicode' | 'unichr'cs/tt|�j||�d|jk|_dS)N�unicode_literals)�superr�
start_treeZfuture_featuresr)�selfZtree�filename)�	__class__��>/opt/alt/python34/lib64/python3.4/lib2to3/fixes/fix_unicode.pyr	szFixUnicode.start_treecCs�|jtjkr2|j�}t|j|_|S|jtjkr�|j}|jr�|ddkr�d|kr�djdd�|j	d�D��}n|ddkr�|dd�}n||jkr�|S|j�}||_|SdS)	N�z'"�\z\\cSs.g|]$}|jdd�jdd��qS)z\uz\\uz\Uz\\U)�replace)�.0�vr
r
r�
<listcomp>!s	z(FixUnicode.transform.<locals>.<listcomp>ZuU�)
�typer�NAMEZclone�_mapping�value�STRINGr�join�split)r
ZnodeZresults�new�valr
r
r�	transforms"	&		zFixUnicode.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr	rr
r
)rrrsrN)�__doc__Zpgen2r�rrZBaseFixrr
r
r
r�<module>	s