î
\á[\±  ã               @   sC   d  Z  d d l m Z d d l m Z Gd d „  d e j ƒ Z d S)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  Z d  Z d Z d Z d d „  Z d S)ÚFixXreadlinesTz‡
    power< call=any+ trailer< '.' 'xreadlines' > trailer< '(' ')' > >
    |
    power< any+ trailer< '.' no_call='xreadlines' > >
    c             C   sV   | j  d ƒ } | r4 | j t d d | j ƒƒ n | j d d „  | d Dƒ ƒ d  S)NÚno_callÚ__iter__Úprefixc             S   s   g  |  ] } | j  ƒ  ‘ q S© )Zclone)Ú.0Úxr   r   ú2/usr/lib/python3.4/lib2to3/fixes/fix_xreadlines.pyú
<listcomp>   s   	 z+FixXreadlines.transform.<locals>.<listcomp>Úcall)ÚgetÚreplacer   r   )ÚselfZnodeZresultsr   r   r   r   Ú	transform   s    zFixXreadlines.transformN)Ú__name__Ú
__module__Ú__qualname__ZBM_compatibleZPATTERNr   r   r   r   r   r      s   r   N)Ú__doc__Ú r   Z
fixer_utilr   ZBaseFixr   r   r   r   r   Ú<module>   s   