|
Server IP : 111.118.215.156 / Your IP : 216.73.216.76 Web Server : Apache System : Linux md-in-26.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : azasoqqa ( 1858) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /lib64/python3.6/lib2to3/fixes/__pycache__/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
3
\� � @ 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@ |j d�}|r$|jtd|jd�� n|jdd� |d D �� d S )N�no_call�__iter__)�prefixc S s g | ]}|j � �qS � )Zclone)�.0�xr r �&/usr/lib64/python3.6/fix_xreadlines.py�
<listcomp> s z+FixXreadlines.transform.<locals>.<listcomp>Zcall)�get�replacer r )�selfZnode�resultsr 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