Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/lib2to3/fixes/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/lib2to3/fixes/__pycache__/fix_next.cpython-38.pyc
U

?��gf�@sndZddlmZddlmZddlmZddlm	Z	m
Z
mZdZGdd�dej
�Zd	d
�Zdd�Zd
d�ZdS)z.Fixer for it.next() -> next(it), per PEP 3114.�)�token)�python_symbols)�
fixer_base)�Name�Call�find_bindingz;Calls to builtin next() possibly shadowed by global bindingcs0eZdZdZdZdZ�fdd�Zdd�Z�ZS)�FixNextTa�
    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* >
    �precs>tt|��||�td|�}|r4|�|t�d|_nd|_dS)N�nextTF)�superr�
start_treer�warning�bind_warning�
shadowed_next)�selfZtree�filename�n��	__class__��5/opt/cppython/lib/python3.8/lib2to3/fixes/fix_next.pyr$s
zFixNext.start_treecCs|st�|�d�}|�d�}|�d�}|rz|jrF|�td|jd��n2dd�|D�}d|d	_|�ttd
|jd�|��n�|r�td|jd�}|�|�nl|r�t|�r�|d}d�dd�|D���	�d
kr�|�
|t�dS|�td��nd|k�r|�
|t�d|_dS)N�base�attr�name�__next__)�prefixcSsg|]}|���qSr)Zclone��.0rrrr�
<listcomp>9sz%FixNext.transform.<locals>.<listcomp>��r
�headcSsg|]}t|��qSr)�strrrrrrEs�__builtin__�globalT)�AssertionError�getr�replacerrr�is_assign_target�join�stripr
r)r�node�resultsrrrrr!rrr�	transform.s.




zFixNext.transform)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERN�orderrr-�
__classcell__rrrrrs

rcCsFt|�}|dkrdS|jD]&}|jtjkr0dSt||�rdSqdS)NFT)�find_assign�children�typer�EQUAL�
is_subtree)r+ZassignZchildrrrr(Qs

r(cCs4|jtjkr|S|jtjks&|jdkr*dSt|j�S�N)r5�symsZ	expr_stmtZsimple_stmt�parentr3�r+rrrr3]s
r3cs$|�krdSt�fdd�|jD��S)NTc3s|]}t|��VqdSr8)r7)r�cr;rr�	<genexpr>gszis_subtree.<locals>.<genexpr>)�anyr4)�rootr+rr;rr7dsr7N)�__doc__Zpgen2rZpygramrr9rrZ
fixer_utilrrrrZBaseFixrr(r3r7rrrr�<module>s@

F1le Man4ger