Files
PowerToys/PythonHome/Lib/lib2to3/fixes/fix_next.pyc

30 lines
3.4 KiB
Plaintext
Raw Normal View History

2014-07-09 18:15:23 +08:00
<03>
<EFBFBD>W`Sc@s<>dZddlmZddlmZddlmZddlm Z m
Z
m Z dZ dej fd<00><00>YZd <00>Zd
<00>Zd <00>Zd S( s.Fixer for it.next() -> next(it), per PEP 3114.i(ttoken(tpython_symbols(t
fixer_base(tNametCallt find_bindings;Calls to builtin next() possibly shadowed by global bindingtFixNextcBs,eZeZdZdZd<00>Zd<00>ZRS(s<>
power< base=any+ trailer< '.' attr='next' > trailer< '(' ')' > >
|
power< head=any+ trailer< '.' attr='next' > not trailer< '(' ')' > >
|
classdef< 'class' any+ ':'
suite< any*
funcdef< 'def'
name='next'
parameters< '(' NAME ')' > any+ >
any* > >
|
global=global_stmt< 'global' any* 'next' any* >
tprecCsWtt|<00>j||<00>td|<00>}|rJ|j|t<00>t|_n t|_dS(Nunext( tsuperRt
start_treeRtwarningt bind_warningtTruet shadowed_nexttFalse(tselfttreetfilenametn((s.\Lib\lib2to3\fixes\fix_next.pyR $s  cCs<>|s t<00>|jd<00>}|jd<00>}|jd<00>}|r<>|jrg|jtdd|j<00><01>q<>g|D]}|j<00>^qn}d|d_|jttdd|j<00>|<00><00>n<>|r<>tdd|j<00>}|j|<00>n<>|rct|<00>rM|d }d
j g|D]}t
|<00>^q<01>j <00>d krI|j |t <00>ndS|jtd<00><00>n(d |kr<>|j |t <00>t|_ndS( Ntbasetattrtnameu__next__tprefixuiunexttheadtu __builtin__tglobal(tAssertionErrortgetR treplaceRRtcloneRtis_assign_targettjointstrtstripR
R R (RtnodetresultsRRRRR((s.\Lib\lib2to3\fixes\fix_next.pyt transform.s.   ( 
4 (t__name__t
__module__R t BM_compatibletPATTERNtorderR R$(((s.\Lib\lib2to3\fixes\fix_next.pyRs

cCs]t|<00>}|dkrtSx:|jD]/}|jtjkrBtSt||<00>r&tSq&WtS(N( t find_assigntNoneRtchildrenttypeRtEQUALt
is_subtreeR (R"tassigntchild((s.\Lib\lib2to3\fixes\fix_next.pyRQs  cCsH|jtjkr|S|jtjks7|jdkr;dSt|j<00>S(N(R-tsymst expr_stmtt simple_stmttparentR+R*(R"((s.\Lib\lib2to3\fixes\fix_next.pyR*]s
!cs-|<00>krtSt<00>fd<00>|jD<><00>S(Nc3s|]}t|<00><00>VqdS(N(R/(t.0tc(R"(s.\Lib\lib2to3\fixes\fix_next.pys <genexpr>gs(R tanyR,(trootR"((R"s.\Lib\lib2to3\fixes\fix_next.pyR/ds N(t__doc__tpgen2RtpygramRR2RRt
fixer_utilRRRR tBaseFixRRR*R/(((s.\Lib\lib2to3\fixes\fix_next.pyt<module>s@