Your IP : 3.15.18.118


Current Path : /lib64/python3.6/__pycache__/
Upload File :
Current File : //lib64/python3.6/__pycache__/types.cpython-36.pyc

3


 \�"�@s�dZddlZdd�Zee�Zedd��Zeej�Zeej�Z	eej
�Zdd�Zee��Z
d	d
�Ze�Zee�Zej�dd�Ze�Zee�ZGd
d�d�Zee�j�Zee�Zegj�Zee�Zye�Wn:ek
�rej�dZee�Zeej�Z dZ[YnXeej�Z!eej"�Z#[[[[[fddfdd�Z$fdfdd�Z%dd�Z&Gdd�d�Z'ddl(Z)ddl*j+Z,Gdd�d�Z-dd�Z.dd�e/�D�Z0dS)zO
Define names for built-in types that aren't directly accessible as a builtin.
�NcCsdS)N�rrr�/usr/lib64/python3.6/types.py�_fsrcCsdS)Nrrrrr�<lambda>
srccs
dVdS)N�rrrrr�_gsrc�sdS)Nrrrrr�_csrcCs
dVdS)Nrrrrr�_agsr	c@seZdZdd�ZdS)�_CcCsdS)Nr)�selfrrr�_m!sz_C._mN)�__name__�
__module__�__qualname__rrrrrr
 sr
�cCs2t|||�\}}}|dk	r"||�||||f|�S)zBCreate a class object dynamically using the appropriate metaclass.N)�
prepare_class)�name�bases�kwds�	exec_body�meta�nsrrr�	new_class9srcCs~|dkri}nt|�}d|kr*|jd�}n|r<t|d�}nt}t|t�rTt||�}t|d�rp|j||f|�}ni}|||fS)azCall the __prepare__ method of the appropriate metaclass.

    Returns (metaclass, namespace, kwds) as a 3-tuple

    *metaclass* is the appropriate metaclass
    *namespace* is the prepared class namespace
    *kwds* is an updated copy of the passed in kwds argument with any
    'metaclass' entry removed. If no kwds argument is passed in, this will
    be an empty dict.
    N�	metaclassr�__prepare__)�dict�pop�type�
isinstance�_calculate_meta�hasattrr)rrrrrrrrr@s


rcCsB|}x8|D]0}t|�}t||�r"q
t||�r2|}q
td��q
W|S)z%Calculate the most derived metaclass.zxmetaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases)r�
issubclass�	TypeError)rr�winner�base�	base_metarrrr`s


rc@sLeZdZdZddd�Zddd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�DynamicClassAttributeaRoute attribute access on a class to __getattr__.

    This is a descriptor, used to define attributes that act differently when
    accessed through an instance and through a class.  Instance access remains
    normal, but access to an attribute through a class will be routed to the
    class's __getattr__ method; this is done by raising AttributeError.

    This allows one to have properties active on an instance, and have virtual
    attributes on the class with the same name (see Enum for an example).

    NcCs>||_||_||_|p|j|_|dk|_tt|dd��|_dS)N�__isabstractmethod__F)�fget�fset�fdel�__doc__�
overwrite_doc�bool�getattrr')rr(r)r*�docrrr�__init__}s
zDynamicClassAttribute.__init__cCs6|dkr|jr|St��n|jdkr,td��|j|�S)Nzunreadable attribute)r'�AttributeErrorr()r�instance�
ownerclassrrr�__get__�s
zDynamicClassAttribute.__get__cCs"|jdkrtd��|j||�dS)Nzcan't set attribute)r)r1)rr2�valuerrr�__set__�s
zDynamicClassAttribute.__set__cCs |jdkrtd��|j|�dS)Nzcan't delete attribute)r*r1)rr2rrr�
__delete__�s
z DynamicClassAttribute.__delete__cCs8|jr|jnd}t|�||j|j|p(|j�}|j|_|S)N)r,r+rr)r*)rr(�fdoc�resultrrr�getter�szDynamicClassAttribute.gettercCs$t|�|j||j|j�}|j|_|S)N)rr(r*r+r,)rr)r9rrr�setter�szDynamicClassAttribute.settercCs$t|�|j|j||j�}|j|_|S)N)rr(r)r+r,)rr*r9rrr�deleter�szDynamicClassAttribute.deleter)NNNN)N)r
rrr+r0r4r6r7r:r;r<rrrrr&qs


	r&c@s�eZdZdd�Zdd�Zdd�Zdd�Zed	d
��Zedd��Z	ed
d��Z
edd��ZeZe	Z
e
ZeZdd�Zdd�ZeZdS)�_GeneratorWrappercCs2||_|jtk|_t|dd�|_t|dd�|_dS)Nr
r)�_GeneratorWrapper__wrapped�	__class__�
GeneratorType�_GeneratorWrapper__isgenr.r
r)r�genrrrr0�sz_GeneratorWrapper.__init__cCs|jj|�S)N)r>�send)r�valrrrrC�sz_GeneratorWrapper.sendcGs|jj|f|��S)N)r>�throw)r�tp�restrrrrE�sz_GeneratorWrapper.throwcCs
|jj�S)N)r>�close)rrrrrH�sz_GeneratorWrapper.closecCs|jjS)N)r>�gi_code)rrrrrI�sz_GeneratorWrapper.gi_codecCs|jjS)N)r>�gi_frame)rrrrrJ�sz_GeneratorWrapper.gi_framecCs|jjS)N)r>�
gi_running)rrrrrK�sz_GeneratorWrapper.gi_runningcCs|jjS)N)r>�gi_yieldfrom)rrrrrL�sz_GeneratorWrapper.gi_yieldfromcCs
t|j�S)N)�nextr>)rrrr�__next__�sz_GeneratorWrapper.__next__cCs|jr|jS|S)N)rAr>)rrrr�__iter__�sz_GeneratorWrapper.__iter__N)r
rrr0rCrErH�propertyrIrJrKrL�cr_code�cr_frame�
cr_running�cr_awaitrNrO�	__await__rrrrr=�sr=cs�t��std���jtkr�t�dd�jtkr��jj}|d@r@�S|d@r��j}t|j|j	|j
|j|jdB|j|j
|j|j|j|j|j|j|j|j��_�Stj���fdd��}|S)	z2Convert regular generator function to a coroutine.z$types.coroutine() expects a callable�__code__Ni�� �csT�||�}|jtks*|jtkr.|jjd@r.|St|tj�rPt|tj�rPt	|�S|S)NrX)
r?�
CoroutineTyper@rI�co_flagsr�_collections_abc�	Generator�	Coroutiner=)�args�kwargs�coro)�funcrr�wrapped�s

zcoroutine.<locals>.wrapped)�callabler"r?�FunctionTyper.�CodeTyperVrZ�co_argcount�co_kwonlyargcount�
co_nlocals�co_stacksize�co_code�	co_consts�co_names�co_varnames�co_filename�co_name�co_firstlineno�	co_lnotab�co_freevars�co_cellvars�
_functools�wraps)rarZ�corbr)rar�	coroutine�s(

rwcCs g|]}|dd�dkr|�qS)Nr�_r)�.0�nrrr�
<listcomp>
sr{)1r+�sysrrrd�
LambdaTyperVre�__dict__�MappingProxyType�implementation�SimpleNamespacerr@rrYrHr	�AsyncGeneratorTyper
r�
MethodType�len�BuiltinFunctionType�append�BuiltinMethodType�
ModuleTyper"�exc_info�tb�
TracebackType�tb_frame�	FrameType�GetSetDescriptorType�__globals__�MemberDescriptorTyperrrr&�	functoolsrt�collections.abc�abcr[r=rw�globals�__all__rrrr�<module>sR








 :
%7