Viewing File: /opt/alt/python-internal/lib64/python3.11/encodings/__pycache__/punycode.cpython-311.opt-1.pyc
!A?h & d Z ddlZd Zd Zd Zd Zd ZdZd Zd
Z d Z
d Zd
Zd Z
d Z G d dej Z G d dej Z G d dej Z G d deej Z G d deej Zd ZdS )uY Codec for the Punicode encoding, as specified in RFC 3492
Written by Martin v. Löwis.
Nc t }t }| D ]M}t | dk r#| t | 8| | Nt | }t
| |fS )z 3.1 Basic code point segregation ) bytearraysetordappendaddsortedbytes)strbaseextendedcs ?/opt/alt/python-internal/lib64/python3.11/encodings/punycode.py segregater
s| ;;DuuH
q66C<<KKALLOOOOhH;; c D d}| D ]}t | |k r|dz
}|S )z@Return the length of str, considering only characters below max.r )r )r maxresr s r
selective_lenr s4
C
q66C<<1HCJr c ~ t | } |dz
}||k rdS | | }||k r|dz |fS ||k r|dz
}.)a Return 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 charindexposlr s r selective_findr sb CAq!888H997C<
XXQJEr c d}g }d}|D ]t}dx}}t | }t | | } | dz ||z
z }
t | ||| \ }}|dk rn%|
||z
z
}
| |
dz
|}d}
A|}u|S )3.2 Insertion unsort codingr r r r )r r r r )r r oldcharresultoldindexr r r r curlendeltas r insertion_unsortr' 0 s G
FH
1vvsD))dWn- &s1U377IE#{{UX%%EMM%'"""HE Mr c <