D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
lib
/
python3.6
/
site-packages
/
libfuturize
/
fixes
/
__pycache__
/
Filename :
fix_UserDict.cpython-36.pyc
back
Copy
3 �c � @ sP d Z ddlmZ ddlmZmZ ddlmZmZm Z ddiZ G dd� de �Zd S ) zCFix UserDict. Incomplete! TODO: base this on fix_urllib perhaps? � )� fixer_base)�Name� attr_chain)� alternates� build_pattern� FixImports�UserDict�collectionsc sT e Zd ZdZdZeZdZdd� Z� fdd�Z � fdd�Z � fd d �Zdd� Z� Z S ) �FixUserdictT� c C s dj t| j��S )N�|)�joinr �mapping)�self� r �"/usr/lib/python3.6/fix_UserDict.pyr 5 s zFixUserdict.build_patternc s | j � | _tt| �j� d S )N)r ZPATTERN�superr �compile_pattern)r )� __class__r r r 8 s zFixUserdict.compile_patternc sH t t| �j� � |�}|rDd|kr@t� fdd�t|d�D ��r@dS |S dS )N�bare_with_attrc 3 s | ]}� |�V qd S )Nr )�.0�obj)�matchr r � <genexpr>F s z$FixUserdict.match.<locals>.<genexpr>�parentF)r r r �anyr )r �node�results)r )r r r ? s zFixUserdict.matchc s t t| �j||� i | _d S )N)r r � start_tree�replace)r Ztree�filename)r r r r K s zFixUserdict.start_treec C s� |j d�}|rl|j}t| j| �}|jt||jd�� d|krH|| j|<