
    daf                     J    d Z ddlmZ ddlmZ  G d dej
                        Zy)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 Zd ZdZdZd Zy)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 cg c]  }|j	                          c}       y c c}w )Nno_call__iter__)prefixcall)getreplacer   r
   clone)selfnoderesultsr   xs        7/root/Python-3.12.4/Lib/lib2to3/fixes/fix_xreadlines.py	transformzFixXreadlines.transform   sN    ++i(OODGNNCDLLWV_=!'')=>=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   