%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/lib2to3/fixes/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/lib2to3/fixes/fix_next.pyc

σ
Pκαac@sdZddlmZddlmZddlmZddlm	Z	m
Z
mZdZdej
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,eZeZdZdZd„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* >
    tprecCsWtt|ƒj||ƒtd|ƒ}|rJ|j|tƒt|_n	t|_dS(Nunext(	tsuperRt
start_treeRtwarningtbind_warningtTruet
shadowed_nexttFalse(tselfttreetfilenametn((s2/usr/local/lib/python2.7/lib2to3/fixes/fix_next.pyR	$scCs|st‚|jdƒ}|jdƒ}|jdƒ}|r»|jrg|jtdd|jƒƒq‹g|D]}|jƒ^qn}d|d_|jttdd|jƒ|ƒƒnΠ|rζtdd|jƒ}|j|ƒn₯|rct|ƒrM|d	}d
j	g|D]}t
|ƒ^qƒjƒdkrI|j|t
ƒndS|jtdƒƒn(d|kr‹|j|t
ƒt|_ndS(
Ntbasetattrtnameu__next__tprefixuiunexttheadtu__builtin__tglobal(tAssertionErrortgetR
treplaceRRtcloneRtis_assign_targettjointstrtstripR
RR(RtnodetresultsRRRRR((s2/usr/local/lib/python2.7/lib2to3/fixes/fix_next.pyt	transform.s.	
(
4(t__name__t
__module__Rt
BM_compatibletPATTERNtorderR	R$(((s2/usr/local/lib/python2.7/lib2to3/fixes/fix_next.pyRs
	
cCs]t|ƒ}|dkrtSx:|jD]/}|jtjkrBtSt||ƒr&tSq&WtS(N(	tfind_assigntNoneRtchildrenttypeRtEQUALt
is_subtreeR(R"tassigntchild((s2/usr/local/lib/python2.7/lib2to3/fixes/fix_next.pyRQscCsH|jtjkr|S|jtjks7|jdkr;dSt|jƒS(N(R-tsymst	expr_stmttsimple_stmttparentR+R*(R"((s2/usr/local/lib/python2.7/lib2to3/fixes/fix_next.pyR*]s
!cs-|ˆkrtSt‡fd†|jDƒƒS(Nc3s|]}t|ˆƒVqdS(N(R/(t.0tc(R"(s2/usr/local/lib/python2.7/lib2to3/fixes/fix_next.pys	<genexpr>gs(RtanyR,(trootR"((R"s2/usr/local/lib/python2.7/lib2to3/fixes/fix_next.pyR/dsN(t__doc__tpgen2RtpygramRR2RRt
fixer_utilRRRRtBaseFixRRR*R/(((s2/usr/local/lib/python2.7/lib2to3/fixes/fix_next.pyt<module>s@		

Zerion Mini Shell 1.0