Ñò §ÚêLc@sdZddklZddklZddklZddkl Z l Z l Z dZ dei fd„ƒYZd „Zd „Zd „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&eZdZdZd„Zd„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* > tprecCsYtt|ƒi||ƒtd|ƒ}|o|i|tƒt|_n t|_dS(Nunext( tsuperRt start_treeRtwarningt bind_warningtTruet shadowed_nexttFalse(tselfttreetfilenametn((s./usr/lib64/python2.6/lib2to3/fixes/fix_next.pyR #s  c Cs¯|pt‚|idƒ}|idƒ}|idƒ}|o‡|io |itdd|iƒƒq«g}|D]}||iƒqw~}d|d_|ittdd|iƒ|ƒƒnã|o&tdd|iƒ}|i|ƒn¶|o„t|ƒo`|d }d i g} |D]}| t |ƒq%~ ƒi ƒd jo|i |t ƒndS|itdƒƒn+d |jo|i |t ƒt|_ndS( Ntbasetattrtnameu__next__tprefixuiunexttheadtu __builtin__tglobal(tAssertionErrortgetR treplaceRRtcloneRtis_assign_targettjointstrtstripR R R ( RtnodetresultsRRRt_[1]RRt_[2]((s./usr/lib64/python2.6/lib2to3/fixes/fix_next.pyt transform-s.  ' )  = (t__name__t __module__tPATTERNtorderR R&(((s./usr/lib64/python2.6/lib2to3/fixes/fix_next.pyRs cCsct|ƒ}|djotSx>|iD]3}|itijotSt||ƒotSq(WtS(N( t find_assigntNoneRtchildrenttypeRtEQUALt is_subtreeR (R"tassigntchild((s./usr/lib64/python2.6/lib2to3/fixes/fix_next.pyRPs    cCsM|itijo|S|itijp|idjodSt|iƒS(N(R.tsymst expr_stmtt simple_stmttparentR,R+(R"((s./usr/lib64/python2.6/lib2to3/fixes/fix_next.pyR+\s #cs/|ˆjotSt‡fd†|iDƒƒS(Nc3s"x|]}t|ˆƒVqWdS(N(R0(t.0tc(R"(s./usr/lib64/python2.6/lib2to3/fixes/fix_next.pys fs (R tanyR-(trootR"((R"s./usr/lib64/python2.6/lib2to3/fixes/fix_next.pyR0cs N(t__doc__tpgen2RtpygramRR3RRt fixer_utilRRRR tBaseFixRRR+R0(((s./usr/lib64/python2.6/lib2to3/fixes/fix_next.pyts?