ok

Mini Shell

Direktori : /opt/alt/python35/lib64/python3.5/encodings/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/encodings/__pycache__/punycode.cpython-35.opt-2.pyc



���]��@s5ddlZdd�Zdd�Zdd�Zdd	�Zd
d�ZdZd
d�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
Gdd�dej�ZGdd�dej�ZGdd �d ej�ZGd!d"�d"eej�ZGd#d$�d$eej�Zd%d&�ZdS)'�NcCstt�}t�}xC|D];}t|�dkrG|jt|��q|j|�qWt|�}t|�|fS)N�)�	bytearray�set�ord�append�add�sorted�bytes)�str�base�extended�c�r�-/opt/alt/python35/lib64/python3.5/punycode.py�	segregate
s		
rcCs7d}x*|D]"}t|�|kr
|d7}q
W|S)Nr�)r)r
�max�resr
rrr�
selective_lens

rcCskt|�}xX|d7}||kr)dS||}||krM|d|fS||kr|d7}qWdS)Nr���r)rr)�len)r
�char�index�pos�lr
rrr�selective_finds

rcCs�d}g}d}x�|D]�}d}}t|�}t||�}	|	d||}
xWt||||�\}}|dkr�P|
||7}
|j|
d�|}d}
qYW|}qW|S)Nrrrrrr)rrrr)r
rZoldchar�resultZoldindexr
rrrZcurlen�deltarrr�insertion_unsort0s$



rcCs6d|d|}|dkr"dS|dkr2dS|S)N�$r�r)�j�biasrrrr�TFsr#s$abcdefghijklmnopqrstuvwxyz0123456789cCs�t�}d}xwt||�}||krH|jt|�t|�S|jt|||d|�||d|}|d7}qWdS)Nrrr)rr#r�digitsr	)�Nr"rr!�trrr�generate_generalized_integerNs	
!r'cCsr|r|d}n
|d}|||7}d}x$|dkrW|d}|d7}q4W|d||d}|S)Ni��ri��#r�&r)r�first�numcharsZ	divisionsr"rrr�adapt[s


r-cCsrt�}d}xVt|�D]H\}}t||�}|j|�t||dk||d�}qWt|�S)N�Hrr)r�	enumerater'�extendr-r	)Zbaselen�deltasrr"Zpointsr�srrr�generate_integersjs	
$r3cCsLt|�\}}t||�}tt|�|�}|rH|d|S|S)N�-)rrr3r)�textrrr1rrr�punycode_encodeusr6c
Cs@d}d}d}x'yt||�}Wn8tk
rc|dkrQtd��|ddfSYnX|d7}d|ko�dknr�|d}nVd|ko�dknr�|d	}n-|dkr�td
||��n
|dfSt||�}	|||7}||	kr ||fS|d|	}|d7}qWdS)Nrr�strictzincomplete punicode string�A�Z�0�9�z Invalid extended code point '%s'r)r�
IndexError�UnicodeErrorr#)
r�extposr"�errorsr�wr!rZdigitr&rrr�decode_generalized_numbers2





rBc	Csd}d	}d}d}x�|t|�krt||||�\}}|dkrX|S||d7}||t|�d7}|dkr�|dkr�td|��td�}|t|�d}|d|�t|�||d�}t||dkt|��}|}qW|S)
Nrrr.ri��r7zInvalid character U+%x�?r)rrBr>r�chrr-)	rrr@rrr"r?Znewposrrrr�insertion_sort�s(	(
rEcCs�t|t�r|jd�}t|t�r9t|�}|jd�}|dkrrd}t|d�j�}n?t|d|�d|�}t||dd�d�j�}t|||�S)N�asciir4r�r)�
isinstancer
�encode�
memoryviewr	�rfind�upperrE)r5r@rrrrrr�punycode_decode�s#rMc@s.eZdZddd�Zddd�ZdS)�Codecr7cCst|�}|t|�fS)N)r6r)�self�inputr@rrrrrI�szCodec.encodecCs;|dkrtd|��t||�}|t|�fS)Nr7�replace�ignorezUnsupported error handling )r7rQrR)r>rMr)rOrPr@rrrr�decode�szCodec.decodeN)�__name__�
__module__�__qualname__rIrSrrrrrN�srNc@seZdZddd�ZdS)�IncrementalEncoderFcCs
t|�S)N)r6)rOrP�finalrrrrI�szIncrementalEncoder.encodeN)rTrUrVrIrrrrrW�srWc@seZdZddd�ZdS)�IncrementalDecoderFcCs2|jdkr"td|j��t||j�S)Nr7rQrRzUnsupported error handling )r7rQrR)r@r>rM)rOrPrXrrrrS�szIncrementalDecoder.decodeN)rTrUrVrSrrrrrY�srYc@seZdZdS)�StreamWriterN)rTrUrVrrrrrZ�srZc@seZdZdS)�StreamReaderN)rTrUrVrrrrr[�sr[cCs@tjdddt�jdt�jdtdtdtdt�S)	N�nameZpunycoderIrS�incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInforNrIrSrWrYrZr[rrrr�getregentry�s	rc)rarrrrr#r$r'r-r3r6rBrErMrNrWrYrZr[rcrrrr�<module>s&



Zerion Mini Shell 1.0