Your IP : 3.128.94.112


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_renames.cpython-34.pyo

�
j f��@s{dZddlmZddlmZmZiidd6d6ZiZdd�Zd	d
�Z	Gdd�dej
�Zd
S)z?Fix incompatible renames

Fixes:
  * sys.maxint -> sys.maxsize
�)�
fixer_base)�Name�
attr_chain�maxsizeZmaxint�syscCsddjtt|��dS)N�(�|�))�join�map�repr)Zmembers�r
�>/opt/alt/python34/lib64/python3.4/lib2to3/fixes/fix_renames.py�
alternatessrccs{xtttj��D]`\}}xQt|j��D]=\}}|t||f<d|||fVd||fVq2WqWdS)Nz�
                  import_from< 'from' module_name=%r 'import'
                      ( attr_name=%r | import_as_name< attr_name=%r 'as' any >) >
                  z^
                  power< module_name=%r trailer< '.' attr_name=%r > any* >
                  )�list�MAPPING�items�LOOKUP)�module�replaceZold_attr�new_attrr
r
r�
build_patterns

rcsLeZdZdZdje��ZdZ�fdd�Zdd�Z	�S)�
FixRenamesTrZprecsXtt|�j��|�}|rTt�fdd�t|d�D��rPdS|SdS)Nc3s|]}�|�VqdS)Nr
)�.0�obj)�matchr
r�	<genexpr>5sz#FixRenames.match.<locals>.<genexpr>�parentF)�superrr�anyr)�self�node�results)�	__class__)rrr1s(zFixRenames.matchcCsc|jd�}|jd�}|r_|r_t|j|jf}|jt|d|j��ndS)NZmodule_name�	attr_name�prefix)�getr�valuerrr%)r r!r"Zmod_namer$rr
r
r�	transform>s
zFixRenames.transform)
�__name__�
__module__�__qualname__Z
BM_compatibler
rZPATTERNZorderrr(r
r
)r#rr*s

rN)�__doc__�rZ
fixer_utilrrrrrrZBaseFixrr
r
r
r�<module>s

?>