Your IP : 18.225.98.39


Current Path : /usr/lib/python3.6/site-packages/idna/__pycache__/
Upload File :
Current File : //usr/lib/python3.6/site-packages/idna/__pycache__/codec.cpython-36.opt-1.pyc

3

�'�X��@s�ddlmZmZmZmZmZddlZddlZejd�Z	Gdd�dej
�Z
Gdd�dej�ZGd	d
�d
ej
�ZGdd�de
ej�ZGd
d�de
ej�Zdd�ZdS)�)�encode�decode�alabel�ulabel�	IDNAError�Nu[.。.。]c@s eZdZddd�Zddd�ZdS)	�Codec�strictcCs.|dkrtdj|���|sdSt|�t|�fS)Nr	z Unsupported error handling "{0}"�r)r
r)r�formatr�len)�self�data�errors�r�/usr/lib/python3.6/codec.pyr	s
zCodec.encodecCs.|dkrtdj|���|sdSt|�t|�fS)Nr	z Unsupported error handling "{0}"r
r)r
r)rrrr)r
rrrrrrs
zCodec.decodeN)r	)r	)�__name__�
__module__�__qualname__rrrrrrrs

rc@seZdZdd�ZdS)�IncrementalEncoderc	Cs�|dkrtdj|���|sdStj|�}d}|rV|dsDd}|d	=n|sV|d
=|rVd}g}d}x2|D]*}|jt|��|r�|d7}|t|�7}qdWdj|�|}|t|�7}||fS)Nr	z Unsupported error handling "{0}"r
rr�.)r
r���rr)rr�_unicode_dots_re�split�appendrr�join)	r
rr�final�labels�trailing_dot�result�size�labelrrr�_buffer_encodes0

z!IncrementalEncoder._buffer_encodeN)rrrr"rrrrrsrc@seZdZdd�ZdS)�IncrementalDecoderc	Cs�|dkrtdj|���|sdSt|t�r4tj|�}nt|�}t|d�|jd�}d}|r~|d	sld}|d
=n|s~|d=|r~d}g}d}x2|D]*}|jt|��|r�|d7}|t	|�7}q�Wdj
|�|}|t	|�7}||fS)Nr	z Unsupported error handling "{0}"r
r�asciirr)r
rrrr)rr�
isinstanceZunicoderr�strrrrr)	r
rrrrrrr r!rrr�_buffer_decode?s8



z!IncrementalDecoder._buffer_decodeN)rrrr'rrrrr#>sr#c@seZdZdS)�StreamWriterN)rrrrrrrr(gsr(c@seZdZdS)�StreamReaderN)rrrrrrrr)jsr)c	Cs tjdt�jt�jttttd�S)NZidna)�namerr�incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInforrrrr#r(r)rrrr�getregentrymsr1)Zcorerrrrrr/�re�compilerr�BufferedIncrementalEncoderr�BufferedIncrementalDecoderr#r(r)r1rrrr�<module>s
!)

?>