| Server IP : 3.138.164.131 / Your IP : 216.73.216.136 Web Server : Apache System : Linux ns1.techtime.me 4.18.0-147.8.1.el8.lve.1.x86_64 #1 SMP Mon Jun 29 09:55:57 EDT 2020 x86_64 User : injazaat ( 1471) PHP Version : 8.1.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python38/lib64/python3.8/lib2to3/fixes/__pycache__/ |
Upload File : |
U
.��c� � @ s2 d Z ddlmZ ddlmZ G dd� dej�ZdS )zpFix "for x in f.xreadlines()" -> "for x in f".
This fixer will also convert g(f.xreadlines) into g(f.__iter__).� )�
fixer_base)�Namec @ s e Zd ZdZdZdd� ZdS )�
FixXreadlinesTz�
power< call=any+ trailer< '.' 'xreadlines' > trailer< '(' ')' > >
|
power< any+ trailer< '.' no_call='xreadlines' > >
c C s@ |� d�}|r$|�td|jd�� n|�dd� |d D �� d S )N�no_call�__iter__)�prefixc S s g | ]}|� � �qS � )Zclone)�.0�xr r �A/opt/alt/python38/lib64/python3.8/lib2to3/fixes/fix_xreadlines.py�
<listcomp> s z+FixXreadlines.transform.<locals>.<listcomp>Zcall)�get�replacer r )�selfZnodeZresultsr r r r � transform s
zFixXreadlines.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr r r r r r s r N)�__doc__� r Z
fixer_utilr ZBaseFixr r r r r �<module> s