Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/email/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/email/__pycache__/_policybase.cpython-37.opt-2.pyc

B

YI~d�:�@s�ddlZddlmZddlmZddlmZdddgZGdd	�d	�Zd
d�Z	dd
�Z
Gdd�deejd�Ze
Gdd�de��Z
e
�ZdS)�N)�header)�charset)�_has_surrogates�Policy�Compat32�compat32cs<eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Z�ZS)�_PolicyBasecsLxF|��D]:\}}t||�r0tt|��||�q
td�||jj���q
WdS)Nz*{!r} is an invalid keyword argument for {})	�items�hasattr�superr�__setattr__�	TypeError�format�	__class__�__name__)�self�kw�name�value)r��6/opt/alt/python37/lib64/python3.7/email/_policybase.py�__init__)s
z_PolicyBase.__init__cCs*dd�|j��D�}d�|jjd�|��S)NcSsg|]\}}d�||��qS)z{}={!r})r)�.0rrrrr�
<listcomp>8sz(_PolicyBase.__repr__.<locals>.<listcomp>z{}({})z, )�__dict__r	rrr�join)r�argsrrr�__repr__7sz_PolicyBase.__repr__cKsz|j�|j�}x$|j��D]\}}t�|||�qWx@|��D]4\}}t||�sdtd�||jj	���t�|||�q>W|S)Nz*{!r} is an invalid keyword argument for {})
r�__new__rr	�objectrr
r
rr)rrZ	newpolicy�attrrrrr�clone<s
z_PolicyBase.clonecCs,t||�rd}nd}t|�|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|jf|j�S)N)r!r)r�otherrrr�__add__Usz_PolicyBase.__add__)	r�
__module__�__qualname__rrr!rr%�
__classcell__rr)rrrs
rcCs,|�dd�d}|�dd�d}|d|S)N�
�r)�rsplit�split)�docZ	added_docrrr�_append_doc^sr.cCs�|jr(|j�d�r(t|jdj|j�|_xf|j��D]X\}}|jr4|j�d�r4x<dd�|jD�D](}tt||�d�}|r`t||j�|_Pq`Wq4W|S)N�+rcss |]}|��D]
}|VqqdS)N)�mro)r�base�crrr�	<genexpr>hsz%_extend_docstrings.<locals>.<genexpr>�__doc__)r4�
startswithr.�	__bases__rr	�getattr)�clsrr r2r-rrr�_extend_docstringscs
r9c@s�eZdZdZdZdZdZdZdZdd�Z	dd	�Z
d
d�Zej
dd
��Zej
dd��Zej
dd��Zej
dd��Zej
dd��ZdS)rFr)Z8bit�NNcCs|jr
|�|�||�dS)N)�raise_on_defect�register_defect)r�obj�defectrrr�
handle_defect�szPolicy.handle_defectcCs|j�|�dS)N)Zdefects�append)rr=r>rrrr<�szPolicy.register_defectcCsdS)Nr)rrrrr�header_max_count�szPolicy.header_max_countcCst�dS)N)�NotImplementedError)r�sourcelinesrrr�header_source_parse�szPolicy.header_source_parsecCst�dS)N)rB)rrrrrr�header_store_parse�szPolicy.header_store_parsecCst�dS)N)rB)rrrrrr�header_fetch_parse�s	zPolicy.header_fetch_parsecCst�dS)N)rB)rrrrrr�fold�s
zPolicy.foldcCst�dS)N)rB)rrrrrr�fold_binaryszPolicy.fold_binary)rr&r'r;�linesep�cte_type�max_line_length�mangle_from_Zmessage_factoryr?r<rA�abc�abstractmethodrDrErFrGrHrrrrrps2

)�	metaclassc@sHeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)rTcCs0t|t�s|St|�r(tj|tj|d�S|SdS)N)r�header_name)�
isinstance�strrr�Header�_charset�UNKNOWN8BIT)rrrrrr�_sanitize_headers

zCompat32._sanitize_headercCs>|d�dd�\}}|�d�d�|dd��}||�d�fS)Nr�:r*z 	�z
)r,�lstripr�rstrip)rrCrrrrrrD%szCompat32.header_source_parsecCs||fS)Nr)rrrrrrrE1szCompat32.header_store_parsecCs|�||�S)N)rV)rrrrrrrF7szCompat32.header_fetch_parsecCs|j||dd�S)NT)�sanitize)�_fold)rrrrrrrG>sz
Compat32.foldcCs"|j|||jdkd�}|�dd�S)NZ7bit)r[�ascii�surrogateescape)r\rJ�encode)rrrZfoldedrrrrHHs	zCompat32.fold_binarycCs�g}|�d|�t|t�r\t|�rL|r<tj|tj|d�}qZ|�|�d}q`tj||d�}n|}|dk	r�d}|jdk	r||j}|�|j	|j
|d��|�|j
�d�|�S)Nz%s: )rrP)rPr)rI�
maxlinelenrX)r@rQrRrrrSrTrUrKr_rIr)rrrr[�parts�hr`rrrr\Ts&



zCompat32._foldN)rr&r'rLrVrDrErFrGrHr\rrrrrs
)rMZemailrrrTZemail.utilsr�__all__rr.r9�ABCMetarrrrrrr�<module>sL
 f

Hacked By AnonymousFox1.0, Coded By AnonymousFox