| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/html5lib/__pycache__/ |
Upload File : |
o
V=�^7 � @ sH d dl mZmZmZ d dlmZ zd dlmZ W n ey' d dl mZ Y nw d dl
mZmZ er<d dl
m mZ nzd dlm mZ W n eyY d dl
m mZ Y nw g d�Zzed�Zeee�ssed�Zeee�ssJ �W n ey d ZY nw d
ZG dd� de�ZG d
d� de�Zdd� Zdd� Zdd� Zdd� ZdS )� )�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 ZdZd
dd�Zdd� Zddd �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 sv g }|D ]!\}}t |ttttf�r|D ] }|�||f� qq|�||f� qt�| |� t| �t|�ks6J �d | _ d S �N)
�
isinstance�list�tuple� frozenset�set�append�dict�__init__�len�default)�self�items�_dictEntries�name�value�itemr r �1/usr/lib/python3/dist-packages/html5lib/_utils.pyr 9 s �
zMethodDispatcher.__init__c C s t �| || j�S r )r �getr �r �keyr r r! �__getitem__E s zMethodDispatcher.__getitem__Nc C s
t || �S r )�BoundMethodDispatcher)r �instance�ownerr r r! �__get__H �
zMethodDispatcher.__get__)r r )�__name__�
__module__�__qualname__�__doc__r r% r) r r r r! r
, s
r
c @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dS )r&