Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/lib2to3/fixes/fix_renames.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Qc@sudZddlmZddlmZmZiidd6d6ZiZd�Zd�Z	d	ej
fd
��YZdS(s?Fix incompatible renames

Fixes:
  * sys.maxint -> sys.maxsize
i(t
fixer_base(tNamet
attr_chaintmaxsizetmaxinttsyscCsddjtt|��dS(Nt(t|t)(tjointmaptrepr(tmembers((s//sys/lib/python2.7/lib2to3/fixes/fix_renames.pyt
alternatessccsoxhtj�D]Z\}}xK|j�D]=\}}|t||f<d|||fVd||fVq&Wq
WdS(Ns�
                  import_from< 'from' module_name=%r 'import'
                      ( attr_name=%r | import_as_name< attr_name=%r 'as' any >) >
                  s^
                  power< module_name=%r trailer< '.' attr_name=%r > any* >
                  (tMAPPINGtitemstLOOKUP(tmoduletreplacetold_attrtnew_attr((s//sys/lib/python2.7/lib2to3/fixes/fix_renames.pyt
build_patterns

t
FixRenamescBs8eZeZdje��ZdZd�Zd�Z	RS(RtprecsUtt|�j��|�}|rQt�fd�t|d�D��rMtS|StS(Nc3s|]}�|�VqdS(N((t.0tobj(tmatch(s//sys/lib/python2.7/lib2to3/fixes/fix_renames.pys	<genexpr>5stparent(tsuperRRtanyRtFalse(tselftnodetresults((Rs//sys/lib/python2.7/lib2to3/fixes/fix_renames.pyR1s%cCsi|jd�}|jd�}|re|rett|j|jf�}|jt|d|j��ndS(Ntmodule_namet	attr_nametprefix(tgettunicodeRtvalueRRR$(RR R!tmod_nameR#R((s//sys/lib/python2.7/lib2to3/fixes/fix_renames.pyt	transform>s
(
t__name__t
__module__tTruet
BM_compatibleR	RtPATTERNtorderRR)(((s//sys/lib/python2.7/lib2to3/fixes/fix_renames.pyR*s
	
N(t__doc__tRt
fixer_utilRRRRR
RtBaseFixR(((s//sys/lib/python2.7/lib2to3/fixes/fix_renames.pyt<module>s		

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.