î i f ã@sCdZddlmZddlmZGdd„dejƒZdS)aT Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and itertools.ifilterfalse --> itertools.filterfalse (bugs 2360-2363) imports from itertools are fixed in fix_itertools_import.py If itertools is imported as something else (ie: import itertools as it; it.izip(spam, eggs)) method calls will not get fixed. é)Ú fixer_base)ÚNamec@s;eZdZdZdZdeƒZdZdd„ZdS)Ú FixItertoolsTz7('imap'|'ifilter'|'izip'|'izip_longest'|'ifilterfalse')zì power< it='itertools' trailer< dot='.' func=%(it_funcs)s > trailer< '(' [any] ')' > > | power< func=%(it_funcs)s trailer< '(' [any] ')' > > écCs­d}|dd}d|krt|jd krt|d|d}}|j}|jƒ|jƒ|jj|ƒn|p€|j}|jt|jdd…d|ƒƒdS) NÚfuncéÚitÚ ifilterfalseÚ izip_longestÚdotéÚprefix)r r )Úvaluer ÚremoveÚparentÚreplacer)ÚselfZnodeZresultsr rr r©rú@/opt/alt/python34/lib64/python3.4/lib2to3/fixes/fix_itertools.pyÚ transforms    zFixItertools.transformN) Ú__name__Ú __module__Ú __qualname__Z BM_compatibleZit_funcsÚlocalsZPATTERNZ run_orderrrrrrrs  rN)Ú__doc__ÚrZ fixer_utilrZBaseFixrrrrrÚs