Viewing File: /opt/alt/python35/lib64/python3.5/lib2to3/fixes/__pycache__/fix_xreadlines.cpython-35.opt-1.pyc



¯ÕYf±ã@sCdZddlmZddlmZGdd„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(eZdZdZdZdd„ZdS)Ú
FixXreadlinesTz‡
    power< call=any+ trailer< '.' 'xreadlines' > trailer< '(' ')' > >
    |
    power< any+ trailer< '.' no_call='xreadlines' > >
    cCsV|jdƒ}|r4|jtdd|jƒƒn|jdd„|dDƒƒdS)NÚno_callÚ__iter__ÚprefixcSsg|]}|jƒ‘qS©)Zclone)Ú.0ÚxrrúA/opt/alt/python35/lib64/python3.5/lib2to3/fixes/fix_xreadlines.pyú
<listcomp>s	z+FixXreadlines.transform.<locals>.<listcomp>Zcall)ÚgetÚreplacerr)ÚselfZnodeZresultsrrrrÚ	transformszFixXreadlines.transformN)Ú__name__Ú
__module__Ú__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)Ú__doc__ÚrZ
fixer_utilrZBaseFixrrrrrÚ<module>s
Back to Directory File Manager