Your IP : 18.227.134.165


Current Path : /usr/lib64/python3.6/lib2to3/fixes/__pycache__/
Upload File :
Current File : //usr/lib64/python3.6/lib2to3/fixes/__pycache__/fix_has_key.cpython-36.opt-2.pyc

3


 \|�@s>ddlmZddlmZddlmZmZGdd�dej�ZdS)�)�pytree)�
fixer_base)�Name�parenthesizec@seZdZdZdZdd�ZdS)�	FixHasKeyTa�
    anchor=power<
        before=any+
        trailer< '.' 'has_key' >
        trailer<
            '('
            ( not(arglist | argument<any '=' any>) arg=any
            | arglist<(not argument<any '=' any>) arg=any ','>
            )
            ')'
        >
        after=any*
    >
    |
    negation=not_test<
        'not'
        anchor=power<
            before=any+
            trailer< '.' 'has_key' >
            trailer<
                '('
                ( not(arglist | argument<any '=' any>) arg=any
                | arglist<(not argument<any '=' any>) arg=any ','>
                )
                ')'
            >
        >
    >
    c

Cs||j}|jj|jkr&|jj|j�r&dS|jd�}|d}|j}dd�|dD�}|dj�}|jd�}	|	rxdd�|	D�}	|j|j	|j|j
|j|j|j
|jfkr�t|�}t|�d	kr�|d
}ntj|j|�}d|_tddd
�}
|r�tddd
�}tj|j||
f�}
tj|j	||
|f�}|	�r8t|�}tj|j|ft|	��}|jj|j	|j|j|j|j|j|j|j|jf	k�rrt|�}||_|S)N�negation�anchorcSsg|]}|j��qS�)�clone)�.0�nr	r	�1/usr/lib64/python3.6/lib2to3/fixes/fix_has_key.py�
<listcomp>Rsz'FixHasKey.transform.<locals>.<listcomp>�before�arg�aftercSsg|]}|j��qSr	)r
)rrr	r	r
rVs��� �in)�prefix�not)�syms�parent�typeZnot_test�pattern�match�getrr
Z
comparisonZand_testZor_testZtestZlambdefZargumentr�lenrZNodeZpowerrZcomp_op�tuple�exprZxor_exprZand_exprZ
shift_exprZ
arith_exprZtermZfactor)
�selfZnodeZresultsrrrrrrrZn_opZn_not�newr	r	r
�	transformGsD


zFixHasKey.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr#r	r	r	r
r&srN)�rrZ
fixer_utilrrZBaseFixrr	r	r	r
�<module>!s

?>