AlkantarClanX12

Your IP : 18.224.31.82


Current Path : /opt/alt/python35/lib64/python3.5/email/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/email/__pycache__/_policybase.cpython-35.opt-2.pyc



���]1:�@s�ddlZddlmZddlmZddlmZdddgZGdd	�d	�Zd
d�Z	dd
�Z
Gdd�dedej�Ze
Gdd�de��Z
e
�ZdS)�N)�header)�charset)�_has_surrogates�Policy�Compat32�compat32csReZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Z�S)�_PolicyBasecsjxc|j�D]U\}}t||�rDtt|�j||�q
tdj||jj���q
WdS)Nz*{!r} is an invalid keyword argument for {})	�items�hasattr�superr�__setattr__�	TypeError�format�	__class__�__name__)�self�kw�name�value)r��0/opt/alt/python35/lib64/python3.5/_policybase.py�__init__)sz_PolicyBase.__init__cCs;dd�|jj�D�}dj|jjdj|��S)NcSs(g|]\}}dj||��qS)z{}={!r})r)�.0rrrrr�
<listcomp>8s	z(_PolicyBase.__repr__.<locals>.<listcomp>z{}({})z, )�__dict__r	rrr�join)r�argsrrr�__repr__7s	z_PolicyBase.__repr__cKs�|jj|j�}x0|jj�D]\}}tj|||�q%WxZ|j�D]L\}}t||�s�tdj||jj	���tj|||�qUW|S)Nz*{!r} is an invalid keyword argument for {})
r�__new__rr	�objectrr
r
rr)rrZ	newpolicy�attrrrrr�clone<sz_PolicyBase.clonecCs@t||�rd}nd}t|j|jj|���dS)Nz'{!r} object attribute {!r} is read-onlyz!{!r} object has no attribute {!r})r
�AttributeErrorrrr)rrr�msgrrrrNs	z_PolicyBase.__setattr__cCs|j|j�S)N)r!r)r�otherrrr�__add__Usz_PolicyBase.__add__)r�
__module__�__qualname__rrr!rr%rr)rrrs
rcCs8|jdd�d}|jdd�d}|d|S)N�
�r)�rsplit�split)�docZ	added_docrrr�_append_doc^sr-cCs�|jr:|jjd�r:t|jdj|j�|_x�|jj�D]|\}}|jrJ|jjd�rJxRdd�|jD�D]:}tt||�d�}|r�t||j�|_Pq�WqJW|S)N�+rcss(|]}|j�D]}|VqqdS)N)�mro)r�base�crrr�	<genexpr>hsz%_extend_docstrings.<locals>.<genexpr>�__doc__)r3�
startswithr-�	__bases__rr	�getattr)�clsrr r1r,rrr�_extend_docstringscs	r8c@s�eZdZdZdZdZdZdZdd�Zdd�Z	d	d
�Z
ejdd��Z
ejd
d��Zejdd��Zejdd��Zejdd��ZdS)rFr(Z8bit�NcCs#|jr|�|j||�dS)N)�raise_on_defect�register_defect)r�obj�defectrrr�
handle_defect�s	zPolicy.handle_defectcCs|jj|�dS)N)Zdefects�append)rr<r=rrrr;�szPolicy.register_defectcCsdS)Nr)rrrrr�header_max_count�szPolicy.header_max_countcCs
t�dS)N)�NotImplementedError)r�sourcelinesrrr�header_source_parse�szPolicy.header_source_parsecCs
t�dS)N)rA)rrrrrr�header_store_parse�szPolicy.header_store_parsecCs
t�dS)N)rA)rrrrrr�header_fetch_parse�s	zPolicy.header_fetch_parsecCs
t�dS)N)rA)rrrrrr�fold�s
zPolicy.foldcCs
t�dS)N)rA)rrrrrr�fold_binaryszPolicy.fold_binaryN)rr&r'r:�linesep�cte_type�max_line_length�mangle_from_r>r;r@�abc�abstractmethodrCrDrErFrGrrrrrps/

�	metaclassc@sjeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)rTcCsCt|t�s|St|�r;tj|dtjd|�S|SdS)Nr�header_name)�
isinstance�strrr�Header�_charset�UNKNOWN8BIT)rrrrrr�_sanitize_headerszCompat32._sanitize_headercCsU|djdd�\}}|jd�dj|dd��}||jd�fS)Nr�:r)z 	�z
)r+�lstripr�rstrip)rrBrrrrrrC!s&zCompat32.header_source_parsecCs
||fS)Nr)rrrrrrrD-szCompat32.header_store_parsecCs|j||�S)N)rU)rrrrrrrE3szCompat32.header_fetch_parsecCs|j||dd�S)N�sanitizeT)�_fold)rrrrrrrF:sz
Compat32.foldcCs1|j||d|jdk�}|jdd�S)NrZZ7bit�ascii�surrogateescape)r[rI�encode)rrrZfoldedrrrrGDs	!zCompat32.fold_binarycCs�g}|jd|�t|t�r�t|�ro|rYtj|dtjd|�}q�|j|�d}q�tj|d|�}n|}|dk	r�d}|jdk	r�|j}|j|j	d|j
d|��|j|j
�dj|�S)Nz%s: rrOrrH�
maxlinelenrW)r?rPrQrrrRrSrTrJr^rHr)rrrrZ�parts�hr_rrrr[Ps&	
		"zCompat32._foldN)rr&r'rKrUrCrDrErFrGr[rrrrrs
)rLZemailrrrSZemail.utilsr�__all__rr-r8�ABCMetarrrrrrr�<module>s	L
�f