Your IP : 3.15.2.239


Current Path : /opt/alt/python35/lib64/python3.5/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/lib2to3/fixes/__pycache__/fix_map.cpython-35.opt-2.pyc



���]��@soddlmZddlmZddlmZmZmZmZddl	m
ZGdd�dej�Z
dS)�)�token)�
fixer_base)�Name�Call�ListComp�in_special_context)�python_symbolsc@s.eZdZdZdZdZdd�ZdS)�FixMapTa�
    map_none=power<
        'map'
        trailer< '(' arglist< 'None' ',' arg=any [','] > ')' >
    >
    |
    map_lambda=power<
        'map'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
    >
    |
    power<
        'map' trailer< '(' [arglist=any] ')' >
    >
    zfuture_builtins.mapcCs~|j|�rdS|jjtjkrh|j|d�|j�}d|_tt	d�|g�}nd|kr�t
|dj�|dj�|dj��}n�d|kr�|d	j�}n�d
|kr1|d
}|jtjkr1|jdjt
jkr1|jdjdkr1|j|d
�dSt|�rAdS|j�}d|_tt	d�|g�}|j|_|S)NzYou should use a for loop here��listZ
map_lambdaZxp�fp�itZmap_none�arg�arglist��Nonezjcannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence)Zshould_skip�parent�type�symsZsimple_stmt�warningZclone�prefixrrrrZchildrenr�NAME�valuer)�selfZnode�results�new�args�r�,/opt/alt/python35/lib64/python3.5/fix_map.py�	transform;s6	

	zFixMap.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrr	sr	N)Zpgen2rr
rZ
fixer_utilrrrrZpygramrrZConditionalFixr	rrrr�<module>s"

?>