Your IP : 3.144.15.34


Current Path : /opt/alt/python33/lib64/python3.3/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/lib2to3/fixes/__pycache__/fix_xrange.cpython-33.pyc

�
��f�
c@s_dZddlmZddlmZmZmZddlmZGdd�dej�Z	dS(u/Fixer that changes xrange(...) into range(...).i(u
fixer_base(uNameuCalluconsuming_calls(upatcompcs�|EeZdZdZdZ�fdd�Zdd�Zdd�Zdd	�Z	d
d�Z
dZej
e�Zd
Zej
e�Zdd�Z�S(u	FixXrangeu�
              power<
                 (name='range'|name='xrange') trailer< '(' args=any ')' >
              rest=any* >
              cs)tt|�j||�t�|_dS(N(usuperu	FixXrangeu
start_treeusetutransformed_xranges(uselfutreeufilename(u	__class__(u=/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_xrange.pyu
start_treesuFixXrange.start_treecCs
d|_dS(N(uNoneutransformed_xranges(uselfutreeufilename((u=/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_xrange.pyufinish_treesuFixXrange.finish_treecCs^|d}|jdkr)|j||�S|jdkrH|j||�Stt|���dS(Nunameuxrangeurange(uvalueutransform_xrangeutransform_rangeu
ValueErrorurepr(uselfunodeuresultsuname((u=/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_xrange.pyu	transforms
uFixXrange.transformcCs@|d}|jtdd|j��|jjt|��dS(Nunameurangeuprefix(ureplaceuNameuprefixutransformed_xrangesuadduid(uselfunodeuresultsuname((u=/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_xrange.pyutransform_xrange$s
uFixXrange.transform_xrangecCs�t|�|jkr�|j|�r�ttd�|dj�g�}ttd�|gd|j�}x|dD]}|j|�qsW|SdS(Nurangeuargsulistuprefixurest(uidutransformed_xrangesuin_special_contextuCalluNameucloneuprefixuappend_child(uselfunodeuresultsu
range_callu	list_callun((u=/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_xrange.pyutransform_range*s"uFixXrange.transform_rangeu3power< func=NAME trailer< '(' node=any ')' > any* >u�for_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
            | comparison< any 'in' node=any any*>
         cCs�|jdkrdSi}|jjdk	rg|jj|jj|�rg|d|krg|djtkS|jj|j|�o�|d|kS(NunodeufuncF(uparentuNoneuFalseup1umatchuvalueuconsuming_callsup2(uselfunodeuresults((u=/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_xrange.pyuin_special_context?suFixXrange.in_special_contextT(u__name__u
__module__u__qualname__uTrueu
BM_compatibleuPATTERNu
start_treeufinish_treeu	transformutransform_xrangeutransform_rangeuP1upatcompucompile_patternup1uP2up2uin_special_context(u
__locals__((u	__class__u=/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_xrange.pyu	FixXranges	u	FixXrangeN(
u__doc__uu
fixer_baseu
fixer_utiluNameuCalluconsuming_callsupatcompuBaseFixu	FixXrange(((u=/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_xrange.pyu<module>s

?>