| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/email/__pycache__/ |
Upload File : |
a
R d�: � @ s� d Z ddlZddlmZ ddlmZ ddlmZ g d�ZG dd� d�Z d d
� Z
dd� ZG d
d� de ejd�Z
eG dd� de
��Ze� ZdS )zwPolicy framework for the email package.
Allows fine grained feature control of how the package parses and emits data.
� N)�header)�charset)�_has_surrogates)�Policy�Compat32�compat32c s@ e Zd ZdZ� fdd�Zdd� Zdd� Zdd � Zd
d� Z� Z S )�_PolicyBasea� Policy Object basic framework.
This class is useless unless subclassed. A subclass should define
class attributes with defaults for any values that are to be
managed by the Policy object. The constructor will then allow
non-default values to be set for these attributes at instance
creation time. The instance will be callable, taking these same
attributes keyword arguments, and returning a new instance
identical to the called instance except for those values changed
by the keyword arguments. Instances may be added, yielding new
instances with any non-default values from the right hand
operand overriding those in the left hand operand. That is,
A + B == A(<non-default values of B>)
The repr of an instance can be used to reconstruct the object
if and only if the repr of the values can be used to reconstruct
those values.
c sH |� � D ]:\}}t| |�r.tt| ��||� qtd�|| jj���qdS )z�Create new Policy, possibly overriding some defaults.
See class docstring for a list of overridable attributes.
�*{!r} is an invalid keyword argument for {}N) �items�hasattr�superr �__setattr__� TypeError�format� __class__�__name__)�self�kw�name�value�r � �'/usr/lib/python3.9/email/_policybase.py�__init__) s
��z_PolicyBase.__init__c C s* dd� | j �� D �}d�| jjd�|��S )Nc S s g | ]\}}d � ||��qS )z{}={!r})r )�.0r r r r r �
<listcomp>8 s �z(_PolicyBase.__repr__.<locals>.<listcomp>z{}({})z, )�__dict__r
r r r �join)r �argsr r r �__repr__7 s �z_PolicyBase.__repr__c K sr | j �| j �}| j�� D ]\}}t�|||� q|�� D ]4\}}t| |�s^td�|| j j ���t�|||� q8|S )z�Return a new instance with specified attributes changed.
The new instance has the same attribute values as the current object,
except for the changes passed in as keyword arguments.
r )
r �__new__r r
�objectr
r r r r )r r Z newpolicy�attrr r r r �clone<