ok
Direktori : /opt/alt/python311/lib64/python3.11/encodings/__pycache__/ |
Current File : //opt/alt/python311/lib64/python3.11/encodings/__pycache__/punycode.cpython-311.opt-1.pyc |
� �f� � �& � 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� )� bytearray�set�ord�append�add�sorted�bytes)�str�base�extended�cs �9/opt/alt/python311/lib64/python3.11/encodings/punycode.py� segregater s| � ��;�;�D��u�u�H� � � ���q�6�6�C�<�<��K�K��A��������L�L��O�O�O�O��h���H���;�;�� � � c �D � d}| D ]}t |� � |k r|dz }�|S )z@Return the length of str, considering only characters below max.r � )r )r �max�resr s r � selective_lenr s4 � � �C� � � ���q�6�6�C�<�<��1�H�C���Jr 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 �char�index�pos�lr s r �selective_findr sb � � �C���A���q����!�8�8��8���H����9�9���7�C�<�� ��X�X��Q�J�E�r 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 �oldchar�result�oldindexr r r r �curlen�deltas r �insertion_unsortr'