AlkantarClanX12

Your IP : 3.22.42.189


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

U

e5d�:�@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��)/usr/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�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
|�|�||�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�fold�s
zPolicy.foldcCst�dSr&rErIrrr�fold_binaryszPolicy.fold_binary)rr)r*r>�linesep�cte_type�max_line_length�mangle_from_Zmessage_factoryrBr?rD�abc�abstractmethodrHrJrKrLrMrrrrrps&2

	



)�	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_headers

�zCompat32._sanitize_headercCs>|d�dd�\}}|�d�d�|dd��}||�d�fS)Nr�:r-z 	�z
)r/�lstripr�rstrip)rrGrrrrrrH%szCompat32.header_source_parsecCs||fSr&rrIrrrrJ1szCompat32.header_store_parsecCs|�||�Sr&)r\rIrrrrK7szCompat32.header_fetch_parsecCs|j||dd�S)NT��sanitize)�_foldrIrrrrL>sz
Compat32.foldcCs"|j|||jdkd�}|�dd�S)NZ7bitra�ascii�surrogateescape)rcrO�encode)rrrZfoldedrrrrMHs	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�hrgrrrrcTs(
�


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