Hacked By AnonymousFox

Current Path : /opt/alt/python38/lib64/python3.8/email/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/email/__pycache__/_policybase.cpython-38.opt-2.pyc

U

i�f�<�@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)�_PolicyBasecsH|��D]:\}}t||�r.tt|��||�qtd�||jj���qdS�Nz*{!r} is an invalid keyword argument for {})	�items�hasattr�superr�__setattr__�	TypeError�format�	__class__�__name__)�self�kw�name�value�r��6/opt/alt/python38/lib64/python3.8/email/_policybase.py�__init__)s
��z_PolicyBase.__init__cCs*dd�|j��D�}d�|jjd�|��S)NcSsg|]\}}d�||��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__cKsr|j�|j�}|j��D]\}}t�|||�q|��D]4\}}t||�s^td�||jj	���t�|||�q8|Sr	)
r�__new__rr
�objectr
rrrr)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__rrrrrs
rcCs,|�dd�d}|�dd�d}|d|S)N�
�r)�rsplit�split)�docZ	added_docrrr�_append_doc^sr1cCs�|jr(|j�d�r(t|jdj|j�|_|j��D]V\}}|jr2|j�d�r2dd�|jD�D]*}tt||�d�}|r\t||j�|_q2q\q2|S)N�+rcss |]}|��D]
}|VqqdSr&)�mro)r�base�crrr�	<genexpr>hs
z%_extend_docstrings.<locals>.<genexpr>�__doc__)r7�
startswithr1�	__bases__rr
�getattr)�clsrr"r5r0rrr�_extend_docstringscsr<c@s�eZdZdZdZdZdZdZdZdZ	dd�Z
d	d
�Zdd�Ze
jd
d��Ze
jdd��Ze
jdd��Ze
jdd��Ze
jdd��ZdS)rFr,Z8bit�NNTcCs|jr
|�|�||�dSr&)�raise_on_defect�register_defect�r�objZdefectrrr�
handle_defect�szPolicy.handle_defectcCs|j�|�dSr&)Zdefects�appendr@rrrr?�szPolicy.register_defectcCsdSr&r)rrrrr�header_max_count�szPolicy.header_max_countcCst�dSr&��NotImplementedError)r�sourcelinesrrr�header_source_parse�szPolicy.header_source_parsecCst�dSr&rE�rrrrrr�header_store_parse�szPolicy.header_store_parsecCst�dSr&rErIrrr�header_fetch_parse�s	zPolicy.header_fetch_parsecCst�dSr&rErIrrr�folds
zPolicy.foldcCst�dSr&rErIrrr�fold_binaryszPolicy.fold_binary)rr)r*r>�linesep�cte_type�max_line_length�mangle_from_Zmessage_factoryZverify_generated_headersrBr?rD�abc�abstractmethodrHrJrKrLrMrrrrrps(9

	



)�	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�UNKNOWN8BITrIrrr�_sanitize_header!s

�zCompat32._sanitize_headercCs>|d�dd�\}}|�d�d�|dd��}||�d�fS)Nr�:r-z 	�z
)r/�lstripr�rstrip)rrGrrrrrrH-szCompat32.header_source_parsecCs||fSr&rrIrrrrJ9szCompat32.header_store_parsecCs|�||�Sr&)r\rIrrrrK?szCompat32.header_fetch_parsecCs|j||dd�S)NT��sanitize)�_foldrIrrrrLFsz
Compat32.foldcCs"|j|||jdkd�}|�dd�S)NZ7bitra�ascii�surrogateescape)rcrO�encode)rrrZfoldedrrrrMPs	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: rU)rVr)rN�
maxlinelenr^)rCrWrXrrrYrZr[rPrfrNr)rrrrb�parts�hrgrrrrc\s(
�


zCompat32._foldN)rr)r*rQr\rHrJrKrLrMrcrrrrrs
)rRZemailrrrZZemail.utilsr�__all__rr1r<�ABCMetarrrrrrr�<module>s�L
(f

Hacked By AnonymousFox1.0, Coded By AnonymousFox