Ñò §Úê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¡|idƒ}|idƒ}|idƒ}|o‡|io |itdd|iƒƒqg}|D]}||iƒqi~}d|d_|ittdd|iƒ|ƒƒnã|o&tdd|iƒ}|i|ƒn¶|o„t|ƒo`|d }d ig} |D]}| t |ƒq~ ƒi ƒd jo|i |t ƒndS|itdƒƒn+d |jo|i |t ƒt |_ndS( Ntbasetattrtnameu__next__tprefixuiunexttheadtu __builtin__tglobal(tgetR 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(R/(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.pyR/cs N(t__doc__tpgen2RtpygramRR2RRt fixer_utilRRRR tBaseFixRRR*R/(((s./usr/lib64/python2.6/lib2to3/fixes/fix_next.pyts?