ok
Direktori : /opt/alt/python37/lib/python3.7/site-packages/idna/__pycache__/ |
Current File : //opt/alt/python37/lib/python3.7/site-packages/idna/__pycache__/codec.cpython-37.pyc |
B �'�X� � @ s� d dl mZmZmZmZmZ ddlZddlZe�d�Z G dd� dej �Z G dd� dej�ZG d d � d ej �ZG dd� de ej�ZG d d� de ej�Zdd� ZdS )� )�encode�decode�alabel�ulabel� IDNAError� Nu [.。.。]c @ s e Zd Zddd�Zddd�ZdS ) �Codec�strictc C s. |dkrt d�|���|sdS t|�t|�fS )Nr z Unsupported error handling "{0}")� r )r �formatr �len)�self�data�errors� r �;/opt/alt/python37/lib/python3.7/site-packages/idna/codec.pyr s zCodec.encodec C s. |dkrt d�|���|sdS t|�t|�fS )Nr z Unsupported error handling "{0}")r r )r r r r )r r r r r r r s zCodec.decodeN)r )r )�__name__� __module__�__qualname__r r r r r r r s r c @ s e Zd Zdd� ZdS )�IncrementalEncoderc C s� |dkrt d�|���|sdS t�|�}d}|rV|d sDd}|d= n|sV|d= |rVd}g }d}x2|D ]*}|�t|�� |r�|d7 }|t|�7 }qdW d�|�| }|t|�7 }||fS ) Nr z Unsupported error handling "{0}")r r r ����.r r )r r �_unicode_dots_re�split�appendr r �join) r r r �final�labels�trailing_dot�result�size�labelr r r �_buffer_encode s0 z!IncrementalEncoder._buffer_encodeN)r r r r"