관리-도구
편집 파일: _utils.cpython-36.pyc
3 �ReC � @ sD d dl mZmZmZ d dlmZ yd dlmZ W n ek rP d dl mZ Y nX d dl mZmZ ertd dl jjZn2yd dljjZW n ek r� d dl jjZY nX dddd d dgZy,ed�Zeee�s�ed �Zeee�s�t�W n ek r� dZY nX dZG dd� de�ZG dd� de�Zdd� Zdd � Zdd � Zdd� Z dS )� )�absolute_import�division�unicode_literals)� ModuleType)�Mapping)� text_type�PY3N� default_etree�MethodDispatcher�isSurrogatePair�surrogatePairToCodepoint�moduleFactoryFactory�supports_lone_surrogatesz"\uD800"z u"\uD800"FTc @ s. e Zd ZdZf fdd�Zdd� Zd dd�ZdS ) r ap Dict with 2 special properties: On initiation, keys that are lists, sets or tuples are converted to multiple keys so accessing any one of the items in the original list-like object returns the matching value md = MethodDispatcher({("foo", "bar"):"baz"}) md["foo"] == "baz" A default value which can be set through the default attribute. c C s~ g }xN|D ]F\}}t |ttttf�rBx*|D ]}|j||f� q*W q |j||f� q W tj| |� t| �t|�kstt �d | _ d S )N)� isinstance�list�tuple� frozenset�set�append�dict�__init__�len�AssertionError�default)�self�items�_dictEntries�name�value�item� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/html5lib/_utils.pyr 9 s zMethodDispatcher.__init__c C s t j| || j�S )N)r �getr )r �keyr r r! �__getitem__E s zMethodDispatcher.__getitem__Nc C s t || �S )N)�BoundMethodDispatcher)r �instance�ownerr r r! �__get__H s zMethodDispatcher.__get__)N)�__name__� __module__�__qualname__�__doc__r r$ r( r r r r! r , s c @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dS )r% zAWraps a MethodDispatcher, binding its return values to `instance`c C s || _ || _d S )N)r&