Your IP : 3.15.225.188


Current Path : /opt/alt/python33/lib64/python3.3/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/lib2to3/fixes/__pycache__/fix_next.cpython-33.pyc

�
��ffc@s�dZddlmZddlmZddlmZddlm	Z	m
Z
mZdZGdd�dej
�Zd	d
�Zdd�Zd
d�ZdS(u.Fixer for it.next() -> next(it), per PEP 3114.i(utoken(upython_symbols(u
fixer_base(uNameuCallufind_bindingu;Calls to builtin next() possibly shadowed by global bindingcsD|EeZdZdZdZdZ�fdd�Zdd�Z�S(uFixNextu�
    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* >
    uprecsWtt|�j||�td|�}|rJ|j|t�d|_n	d|_dS(NunextTF(	usuperuFixNextu
start_treeufind_bindinguwarningubind_warninguTrueu
shadowed_nextuFalse(uselfutreeufilenameun(u	__class__(u;/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_next.pyu
start_tree$suFixNext.start_treecCsw|st�|jd�}|jd�}|jd�}|r�|jrg|jtdd|j��qsdd�|D�}d|d	_|jttd
d|j�|��n�|r�tdd|j�}|j|�n�|rKt|�r5|d}djdd�|D��j	�d
kr1|j
|t�ndS|jtd��n(d|krs|j
|t�d|_ndS(Nubaseuattrunameu__next__uprefixcSsg|]}|j��qS((uclone(u.0un((u;/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_next.pyu
<listcomp>9s	u%FixNext.transform.<locals>.<listcomp>uiunextuheadcSsg|]}t|��qS((ustr(u.0un((u;/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_next.pyu
<listcomp>Es	u__builtin__uglobalT(
uAssertionErrorugetu
shadowed_nextureplaceuNameuprefixuCalluis_assign_targetujoinustripuwarningubind_warninguTrue(uselfunodeuresultsubaseuattrunameunuhead((u;/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_next.pyu	transform.s.	
(
(uFixNext.transformT(	u__name__u
__module__u__qualname__uTrueu
BM_compatibleuPATTERNuorderu
start_treeu	transform(u
__locals__((u	__class__u;/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_next.pyuFixNexts

uFixNextcCs]t|�}|dkrdSx:|jD]/}|jtjkrBdSt||�r&dSq&WdS(NFT(	ufind_assignuNoneuFalseuchildrenutypeutokenuEQUALu
is_subtreeuTrue(unodeuassignuchild((u;/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_next.pyuis_assign_targetQsuis_assign_targetcCsH|jtjkr|S|jtjks7|jdkr;dSt|j�S(N(utypeusymsu	expr_stmtusimple_stmtuparentuNoneufind_assign(unode((u;/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_next.pyufind_assign]s
!ufind_assigncs0|�krdSt�fdd�|jD��S(Nc3s|]}t|��VqdS(N(u
is_subtree(u.0uc(unode(u;/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_next.pyu	<genexpr>gsuis_subtree.<locals>.<genexpr>T(uTrueuanyuchildren(urootunode((unodeu;/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_next.pyu
is_subtreedsu
is_subtreeN(u__doc__upgen2utokenupygramupython_symbolsusymsuu
fixer_baseu
fixer_utiluNameuCallufind_bindingubind_warninguBaseFixuFixNextuis_assign_targetufind_assignu
is_subtree(((u;/opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_next.pyu<module>s@

?>