Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure you want to rename?
File Manager
/
ALFA_DATA
/
alfasymlink
/
root
/
proc
/
self
/
root
/
opt
/
alt
/
python37
/
lib64
/
python3.7
/
encodings
/
__pycache__
:
punycode.cpython-37.pyc
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
B N��j� � @ s� d Z ddlZdd� Zdd� Zdd� Zd d � Zdd� Zd Zdd� Zdd� Z dd� Z dd� Zdd� Zdd� Z dd� ZG dd� dej�ZG dd� dej�ZG d d!� d!ej�ZG d"d#� d#eej�ZG d$d%� d%eej�Zd&d'� ZdS )(uY Codec for the Punicode encoding, as specified in RFC 3492 Written by Martin v. Löwis. � Nc C sT t � }t� }x2| D ]*}t|�dk r2|�t|�� q|�|� qW t|�}t|�|fS )z 3.1 Basic code point segregation� )� bytearray�set�ord�append�add�sorted�bytes)�str�base�extended�c� r �7/opt/alt/python37/lib64/python3.7/encodings/punycode.py� segregate s r c C s* d}x | D ]}t |�|k r |d7 }q W |S )z@Return the length of str, considering only characters below max.r � )r )r �max�resr r r r � selective_len s r c C sR t | �}xD|d7 }||krdS | | }||kr:|d |fS ||k r |d7 }q W dS )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 N)�len)r �char�index�pos�lr r r r �selective_find s r c C s� d}g }d}x~|D ]v}d }}t |�}t| |�} | d || } xBt| |||�\}}|dkr^P | || 7 } |�| d � |}d} qBW |}qW |S )z3.2 Insertion unsort codingr r r r )r r r r )r r Zoldchar�resultZoldindexr r r r Zcurlen�deltar r r �insertion_unsort0 s$ r c C s, d| d | }|dk rdS |dkr(dS |S )N�$ r � r )�j�biasr r r r �TF s r# s$ abcdefghijklmnopqrstuvwxyz0123456789c C sr t � }d}xbt||�}| |k r4|�t| � t|�S |�t|| | d| � | | d| } |d7 }qW dS )z(3.3 Generalized variable-length integersr r r N)r r# r �digitsr )�Nr"