Your IP : 18.220.134.161
�
{fc @ se d Z d d l m Z d d l m Z d d l m Z m Z m Z m Z d e j
f d � � YZ d S( s� Fixer that changes filter(F, X) into list(filter(F, X)).
We avoid the transformation if the filter() call is directly contained
in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or
for V in <>:.
NOTE: This is still not correct if the original code was depending on
filter(F, X) to return a string if X is a string and a tuple if X is a
tuple. That would require type inference, which we don't do. Let
Python 2.6 figure it out.
i ( t token( t
fixer_base( t Namet Callt ListCompt in_special_contextt FixFilterc B s# e Z e Z d Z d Z d � Z RS( s�
filter_lambda=power<
'filter'
trailer<
'('
arglist<
lambdef< 'lambda'
(fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
>
','
it=any
>
')'
>
>
|
power<
'filter'
trailer< '(' arglist< none='None' ',' seq=any > ')' >
>
|
power<
'filter'
args=trailer< '(' [any] ')' >
>
s future_builtins.filterc C s | j | � r d Sd | k rs t | j d � j � | j d � j � | j d � j � | j d � j � � } n} d | k r� t t d � t d � | d j � t d � � } n= t | � r� d S| j � } d | _ t t d � | g � } | j | _ | S(
Nt
filter_lambdat fpt itt xpt noneu _ft sequ u list( t should_skipR t gett cloneR R t Nonet prefixR ( t selft nodet resultst new( ( s0 /usr/lib64/python2.7/lib2to3/fixes/fix_filter.pyt transform5 s&