| Server IP : 14.225.204.176 / Your IP : 216.73.216.6 Web Server : nginx/1.24.0 System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64 User : root ( 0) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /proc/self/root/lib/python3.12/lib2to3/fixes/__pycache__/ |
Upload File : |
�
�3f� � �J � d Z ddlmZ ddlmZ G d� dej
� Zy)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 � � e Zd ZdZdZd� Zy)�
FixXreadlinesTz�
power< call=any+ trailer< '.' 'xreadlines' > trailer< '(' ')' > >
|
power< any+ trailer< '.' no_call='xreadlines' > >
c �� � |j d� }|r'|j t d|j �� � y |j |d D �cg c] }|j � �� c}� y c c}w )N�no_call�__iter__)�prefix�call)�get�replacer r
�clone)�self�node�resultsr �xs �3/usr/lib/python3.12/lib2to3/fixes/fix_xreadlines.py� transformzFixXreadlines.transform sN � ��+�+�i�(����O�O�D��G�N�N�C�D��L�L�W�V�_�=��!�'�'�)�=�>��=s �
A,N)�__name__�
__module__�__qualname__�
BM_compatible�PATTERNr � � r r r s � ��M��G�?r r N)�__doc__� r �
fixer_utilr �BaseFixr r r r �<module>r s% ��D� � �?�J�&�&� ?r