Current Dir: /snap/core22/2437/usr/lib/python3.10/encodings/__pycache__/

[FILE] aliases.cpython-310.pyc [ edit | delete | rename ]
[FILE] ascii.cpython-310.pyc [ edit | delete | rename ]
[FILE] base64_codec.cpython-310.pyc [ edit | delete | rename ]
[FILE] big5.cpython-310.pyc [ edit | delete | rename ]
[FILE] big5hkscs.cpython-310.pyc [ edit | delete | rename ]
[FILE] bz2_codec.cpython-310.pyc [ edit | delete | rename ]
[FILE] charmap.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp037.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp273.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp424.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp437.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp500.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp720.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp737.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp775.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp850.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp852.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp855.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp856.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp857.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp858.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp860.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp861.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp862.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp863.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp864.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp865.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp866.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp869.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp874.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp875.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp932.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp949.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp950.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1006.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1026.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1125.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1140.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1250.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1251.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1252.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1253.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1254.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1255.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1256.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1257.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp1258.cpython-310.pyc [ edit | delete | rename ]
[FILE] euc_jisx0213.cpython-310.pyc [ edit | delete | rename ]
[FILE] euc_jis_2004.cpython-310.pyc [ edit | delete | rename ]
[FILE] euc_jp.cpython-310.pyc [ edit | delete | rename ]
[FILE] euc_kr.cpython-310.pyc [ edit | delete | rename ]
[FILE] gb2312.cpython-310.pyc [ edit | delete | rename ]
[FILE] gb18030.cpython-310.pyc [ edit | delete | rename ]
[FILE] gbk.cpython-310.pyc [ edit | delete | rename ]
[FILE] hex_codec.cpython-310.pyc [ edit | delete | rename ]
[FILE] hp_roman8.cpython-310.pyc [ edit | delete | rename ]
[FILE] hz.cpython-310.pyc [ edit | delete | rename ]
[FILE] idna.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso2022_jp.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso2022_jp_1.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso2022_jp_2.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso2022_jp_3.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso2022_jp_2004.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso2022_jp_ext.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso2022_kr.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_1.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_2.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_3.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_4.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_5.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_6.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_7.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_8.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_9.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_10.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_11.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_13.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_14.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_15.cpython-310.pyc [ edit | delete | rename ]
[FILE] iso8859_16.cpython-310.pyc [ edit | delete | rename ]
[FILE] johab.cpython-310.pyc [ edit | delete | rename ]
[FILE] koi8_r.cpython-310.pyc [ edit | delete | rename ]
[FILE] koi8_t.cpython-310.pyc [ edit | delete | rename ]
[FILE] koi8_u.cpython-310.pyc [ edit | delete | rename ]
[FILE] kz1048.cpython-310.pyc [ edit | delete | rename ]
[FILE] latin_1.cpython-310.pyc [ edit | delete | rename ]
[FILE] mac_arabic.cpython-310.pyc [ edit | delete | rename ]
[FILE] mac_croatian.cpython-310.pyc [ edit | delete | rename ]
[FILE] mac_cyrillic.cpython-310.pyc [ edit | delete | rename ]
[FILE] mac_farsi.cpython-310.pyc [ edit | delete | rename ]
[FILE] mac_greek.cpython-310.pyc [ edit | delete | rename ]
[FILE] mac_iceland.cpython-310.pyc [ edit | delete | rename ]
[FILE] mac_latin2.cpython-310.pyc [ edit | delete | rename ]
[FILE] mac_roman.cpython-310.pyc [ edit | delete | rename ]
[FILE] mac_romanian.cpython-310.pyc [ edit | delete | rename ]
[FILE] mac_turkish.cpython-310.pyc [ edit | delete | rename ]
[FILE] mbcs.cpython-310.pyc [ edit | delete | rename ]
[FILE] oem.cpython-310.pyc [ edit | delete | rename ]
[FILE] palmos.cpython-310.pyc [ edit | delete | rename ]
[FILE] ptcp154.cpython-310.pyc [ edit | delete | rename ]
[FILE] punycode.cpython-310.pyc [ edit | delete | rename ]
[FILE] quopri_codec.cpython-310.pyc [ edit | delete | rename ]
[FILE] raw_unicode_escape.cpython-310.pyc [ edit | delete | rename ]
[FILE] rot_13.cpython-310.pyc [ edit | delete | rename ]
[FILE] shift_jis.cpython-310.pyc [ edit | delete | rename ]
[FILE] shift_jisx0213.cpython-310.pyc [ edit | delete | rename ]
[FILE] shift_jis_2004.cpython-310.pyc [ edit | delete | rename ]
[FILE] tis_620.cpython-310.pyc [ edit | delete | rename ]
[FILE] undefined.cpython-310.pyc [ edit | delete | rename ]
[FILE] unicode_escape.cpython-310.pyc [ edit | delete | rename ]
[FILE] utf_7.cpython-310.pyc [ edit | delete | rename ]
[FILE] utf_8.cpython-310.pyc [ edit | delete | rename ]
[FILE] utf_8_sig.cpython-310.pyc [ edit | delete | rename ]
[FILE] utf_16.cpython-310.pyc [ edit | delete | rename ]
[FILE] utf_16_be.cpython-310.pyc [ edit | delete | rename ]
[FILE] utf_16_le.cpython-310.pyc [ edit | delete | rename ]
[FILE] utf_32.cpython-310.pyc [ edit | delete | rename ]
[FILE] utf_32_be.cpython-310.pyc [ edit | delete | rename ]
[FILE] utf_32_le.cpython-310.pyc [ edit | delete | rename ]
[FILE] uu_codec.cpython-310.pyc [ edit | delete | rename ]
[FILE] zlib_codec.cpython-310.pyc [ edit | delete | rename ]
[FILE] __init__.cpython-310.pyc [ edit | delete | rename ]

Viewing: /snap/core22/2437/usr/lib/python3.10/encodings/__pycache__/punycode.cpython-310.pyc

o

p̦i��@s�dZddlZdd�Zdd�Zdd�Zd	d
�Zdd�Zd
Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZGdd�dej�ZGdd�dej�ZGd d!�d!ej�ZGd"d#�d#eej�ZGd$d%�d%eej�Zd&d'�ZdS)(uY Codec for the Punicode encoding, as specified in RFC 3492

Written by Martin v. Löwis.
�NcCsPt�}t�}|D]}t|�dkr|�t|��q|�|�qt|�}t|�|fS)z 3.1 Basic code point segregation�)�	bytearray�set�ord�append�add�sorted�bytes)�str�base�extended�c�r�)/usr/lib/python3.10/encodings/punycode.py�	segregate
srcCs&d}|D]}t|�|kr|d7}q|S)z@Return the length of str, considering only characters below max.r�)r)r
�max�resr
rrr�
selective_lens�rcCsLt|�}	|d7}||krdS||}||kr|d|fS||kr%|d7}q)aReturn a pair (index, pos), indicating the next occurrence of
    char in str. index is the position of the character considering
    only ordinals up to and including char, and pos is the position in
    the full string. index/pos is the starting position in the full
    string.r)���r)�len)r
�char�index�pos�lr
rrr�selective_finds�rcCs�d}g}d}|D]:}d}}t|�}t||�}	|	d||}
	t||||�\}}|dkr.n|
||7}
|�|
d�|}d}
q |}q|S)�3.2 Insertion unsort codingrrrr)rrrr)r
r�oldchar�result�oldindexr
rrr�curlen�deltarrr�insertion_unsort0s&
�r"cCs,d|d|}|dkrdS|dkrdS|S)N�$r�r)�j�biasrrrr�TFsr's$abcdefghijklmnopqrstuvwxyz0123456789cCslt�}d}	t||�}||kr|�t|�t|�S|�t|||d|�||d|}|d7}q)�(3.3 Generalized variable-length integersrrr#)rr'r�digitsr	)�Nr&rr%�trrr�generate_generalized_integerNs
�r,cCs^|r|d}n|d}|||7}d}|dkr#|d}|d7}|dks|d||d}|S)Ni��ri��#r#�&r)r!�first�numchars�	divisionsr&rrr�adapt[s
�r3cCsPt�}d}t|�D]\}}t||�}|�|�t||dk||d�}q	t|�S)z3.4 Bias adaptation�Hrr)r�	enumerater,�extendr3r	)�baselen�deltasrr&�pointsr!�srrr�generate_integersjs

r;cCs8t|�\}}t||�}tt|�|�}|r|d|S|S)N�-)rr"r;r)�textrrr8rrr�punycode_encodeus
r>c
Cs�d}d}d}	zt||�}Wnty&|dkrtd��|ddfYSw|d7}d|kr5dkr<nn|d}n#d|krFd	krMnn|d
}n|dkr[td||d��|dfSt||�}	|||7}||	krr||fS|d|	}|d7}q)
r(rr�strictzincomplete punicode stringN�A�Z�0�9�z Invalid extended code point '%s'r#)r�
IndexError�UnicodeErrorr')
r�extposr&�errorsr�wr%r�digitr+rrr�decode_generalized_numbers8�


�
�rKc	Cs�d}d}d}d}|t|�krit||||�\}}|dur|S||d7}||t|�d7}|dkr?|dkr;td	|��td
�}|t|�d}|d|�t|�||d�}t||dkt|��}|}|t|�ks|S)rrrr4rNri��r?zInvalid character U+%x�?)rrKrFr�chrr3)	rrrHrrr&rG�newposr!rrr�insertion_sort�s,� �rOcCs�t|t�r
|�d�}t|t�rt|�}|�d�}|dkr&d}t|d���}nt|d|�d|�}t||dd�d���}t|||�S)N�asciir<r�r)�
isinstancer
�encode�
memoryviewr	�rfind�upperrO)r=rHrrrrrr�punycode_decode�s



rWc@s eZdZddd�Zddd�ZdS)�Codecr?cCst|�}|t|�fS�N)r>r��self�inputrHrrrrrS�szCodec.encodecCs*|dvr
td|��t||�}|t|�fS�N)r?�replace�ignorezUnsupported error handling )rFrWrrZrrr�decode�s
zCodec.decodeN)r?)�__name__�
__module__�__qualname__rSr`rrrrrX�s
rXc@�eZdZddd�ZdS)�IncrementalEncoderFcCst|�SrY)r>�r[r\�finalrrrrS�szIncrementalEncoder.encodeN�F)rarbrcrSrrrrre��rec@rd)�IncrementalDecoderFcCs$|jdvrtd|j��t||j�Sr])rHrFrWrfrrrr`�s
zIncrementalDecoder.decodeNrh)rarbrcr`rrrrrj�rirjc@�eZdZdS)�StreamWriterN�rarbrcrrrrrl��rlc@rk)�StreamReaderNrmrrrrro�rnroc	Cs tjdt�jt�jttttd�S)N�punycode)�namerSr`�incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInforXrSr`rerjrlrorrrr�getregentry�s�rx)�__doc__rvrrrr"r'r)r,r3r;r>rKrOrWrXrerjrlrorxrrrr�<module>s*


Upload File: