관리-도구
편집 파일: codec.cpython-36.pyc
3 �Pf� � @ s� d dl mZmZmZmZmZ ddlZddlZejd�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 dj|���|sdS t|�t|�fS )Nr z Unsupported error handling "{0}"� r )r r )r �formatr �len)�self�data�errors� r �/usr/lib/python3.6/codec.pyr s zCodec.encodec C s. |dkrt dj|���|sdS t|�t|�fS )Nr z Unsupported error handling "{0}"r r )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 dj|���|sdS tj|�}d}|rV|d sDd}|d = n|sV|d = |rVd}g }d}x2|D ]*}|jt|�� |r�|d7 }|t|�7 }qdW dj|�| }|t|�7 }||fS )Nr z Unsupported error handling "{0}"r r 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"