Hacked By AnonymousFox
���]� � @ s� d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z m Z m Z m
Z
m Z m Z d d l m Z e j
d h BZ Gd d � d e j � Z d
S)� )�pytree)�patcomp)�token)�
fixer_base)�Name�Call�LParen�RParen�ArgList�Dot)�
fixer_util�iterc @ s^ e Z d Z d Z d Z d d � Z d Z e j e � Z d Z
e j e
� Z d d � Z d S)
�FixDictTa
power< head=any+
trailer< '.' method=('keys'|'items'|'values'|
'iterkeys'|'iteritems'|'itervalues'|
'viewkeys'|'viewitems'|'viewvalues') >
parens=trailer< '(' ')' >
tail=any*
>
c
C sn | d } | d d } | d } | j } | j } | j d � } | j d � } | s^ | rn | d d � } d d � | D� } d
d � | D� } | o� | j | | � }
| t j | j t � t | d | j �g � | d j
� g } t j | j | � } |
p| s<d
| _ t t | r*d n d � | g � } | r^t j | j | g | � } | j | _ | S)N�head�method� �tailr
�view� c S s g | ] } | j � � q S� )�clone)�.0�nr r �-/opt/alt/python35/lib64/python3.5/fix_dict.py�
<listcomp>B s z%FixDict.transform.<locals>.<listcomp>c S s g | ] } | j � � q Sr )r )r r r r r r C s �prefixZparens� �list)
�syms�value�
startswith�in_special_contextr ZNodeZtrailerr r r r Zpowerr )
�self�node�resultsr r r r Zmethod_name�isiterZisviewZspecial�args�newr r r � transform7 s2
$zFixDict.transformz3power< func=NAME trailer< '(' node=any ')' > any* >zmfor_stmt< 'for' any 'in' node=any ':' any* >
| comp_for< 'for' any 'in' node=any any* >
c C s� | j d k r d Si } | j j d k r� | j j | j j | � r� | d | k r� | rm | d j t k S| d j t j k S| s� d S| j j | j | � o� | d | k S)NFr# �func)�parent�p1�matchr �iter_exemptr �consuming_calls�p2)r"