Your IP : 3.137.211.49


Current Path : /proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/_py_abc.cpython-37.opt-2.pyc

B

YI~d*�@s(ddlmZdd�ZGdd�de�ZdS)�)�WeakSetcCstjS)N)�ABCMeta�_abc_invalidation_counter�rr�,/opt/alt/python37/lib64/python3.7/_py_abc.py�get_cache_tokensrcsReZdZdZ�fdd�Zdd�Zddd�Zd	d
�Zdd�Zd
d�Z	dd�Z
�ZS)rrc	s�t�j||||f|�}dd�|��D�}xF|D]>}x8t|dt��D]&}t||d�}t|dd�rB|�|�qBWq.Wt|�|_t�|_	t�|_
t�|_tj
|_|S)NcSs h|]\}}t|dd�r|�qS)�__isabstractmethod__F)�getattr)�.0�name�valuerrr�	<setcomp>&sz"ABCMeta.__new__.<locals>.<setcomp>�__abstractmethods__rF)�super�__new__�itemsr	�set�add�	frozensetrr�
_abc_registry�
_abc_cache�_abc_negative_cacherr�_abc_negative_cache_version)	�mclsr�bases�	namespace�kwargs�clsZ	abstracts�baser)�	__class__rrr#s

zABCMeta.__new__cCsPt|t�std��t||�r |St||�r2td��|j�|�tjd7_|S)NzCan only register classesz'Refusing to create an inheritance cycle�)	�
isinstance�type�	TypeError�
issubclass�RuntimeErrorrrrr)r�subclassrrr�register6s


zABCMeta.registerNcCs�td|j�d|j��|d�tdt���|d�xJ|jD]@}|�d�r8t||�}t|t�rbt	|�}t|�d|��|d�q8WdS)NzClass: �.)�filezInv. counter: Z_abc_z: )
�print�
__module__�__qualname__r�__dict__�
startswithr	r!rr)rr)rrrrr�_dump_registryHs


zABCMeta._dump_registrycCs|j��dS)N)r�clear)rrrr�_abc_registry_clearSszABCMeta._abc_registry_clearcCs|j��|j��dS)N)rr0r)rrrr�_abc_caches_clearWs
zABCMeta._abc_caches_clearcsb|j}|�jkrdSt|�}||krH�jtjkr>|�jkr>dS��|�St�fdd�||fD��S)NTFc3s|]}��|�VqdS)N)�__subclasscheck__)r
�c)rrr�	<genexpr>jsz,ABCMeta.__instancecheck__.<locals>.<genexpr>)	rrr"rrrrr3�any)r�instancer&Zsubtyper)rr�__instancecheck__\s


zABCMeta.__instancecheck__cCst|t�std��||jkr dS|jtjkr>t�|_tj|_n||jkrLdS|�	|�}|t
k	r�|rp|j�|�n|j�|�|S|t|dd�kr�|j�|�dSx(|j
D]}t||�r�|j�|�dSq�Wx*|��D]}t||�r�|j�|�dSq�W|j�|�dS)Nz"issubclass() arg 1 must be a classTF�__mro__r)r!r"r#rrrrrr�__subclasshook__�NotImplementedrr	rr$�__subclasses__)rr&�okZrclsZsclsrrrr3ls8






zABCMeta.__subclasscheck__)N)�__name__r+r,rrr'r/r1r2r8r3�
__classcell__rr)rrrs
rN)Z_weakrefsetrrr"rrrrr�<module>s

?>