관리-도구
편집 파일: fix_next.cpython-37.opt-1.pyc
B �A�[� � @ sZ d Z ddlmZ ddlmZ ddlmZ ddlm Z m Z mZmZ dZ G dd� dej�Zd S ) z? Fixer for: it.__next__() -> it.next(). next(it) -> it.next(). � )�token)�python_symbols)� fixer_base)�Name�Call�find_binding�Attrz;Calls to builtin next() possibly shadowed by global bindingc @ s e Zd ZdZdd� ZdS )�FixNextas power< base=any+ trailer< '.' attr='__next__' > any* > | power< head='next' trailer< '(' arg=any ')' > any* > | classdef< 'class' base=any+ ':' suite< any* funcdef< 'def' attr='__next__' parameters< '(' NAME ')' > any+ > any* > > c C s� |st �|�d�}|�d�}|�d�}|�d�}|rh|�� }|�ttt|�|jd�td��� |�� n|r�|�td|jd�� d S )N�base�attr�head�arg)�prefix�next) �AssertionError�getZclone�replacer r Zunicoder �remove)�selfZnodeZresultsr r r Zarg_r � r �M/opt/alt/python37/lib/python3.7/site-packages/libpasteurize/fixes/fix_next.py� transform s zFixNext.transformN)�__name__� __module__�__qualname__ZPATTERNr r r r r r s r N)�__doc__Z lib2to3.pgen2r Zlib2to3.pygramr ZsymsZlib2to3r Zlib2to3.fixer_utilr r r r Zbind_warningZBaseFixr r r r r �<module> s