Your IP : 3.129.42.59


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/_py_abc.cpython-310.opt-2.pyc

o

6��f-�@s(ddlmZdd�ZGdd�de�ZdS)�)�WeakSetcCs	tjS�N)�ABCMeta�_abc_invalidation_counter�rr�./opt/alt/python310/lib64/python3.10/_py_abc.py�get_cache_tokensrcsTeZdZ	dZ�fdd�Zdd�Zddd�Zd	d
�Zdd�Zd
d�Z	dd�Z
�ZS)rrc	s�t�j||||fi|��}dd�|��D�}|D]}t|dt��D]}t||d�}t|dd�r4|�|�q!qt|�|_t�|_	t�|_
t�|_tj
|_|S)NcSs h|]\}}t|dd�r|�qS)�__isabstractmethod__F)�getattr)�.0�name�valuerrr�	<setcomp>&s

�z"ABCMeta.__new__.<locals>.<setcomp>�__abstractmethods__r	F)�super�__new__�itemsr
�set�add�	frozensetrr�
_abc_registry�
_abc_cache�_abc_negative_cacherr�_abc_negative_cache_version)	�mclsr�bases�	namespace�kwargs�cls�	abstracts�baser
��	__class__rrr#s"�
��
zABCMeta.__new__cCsR	t|t�s
td��t||�r|St||�rtd��|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�|jD] }|�d�r<t||�}t|t�r1t	|�}t|�d|��|d�qdS)NzClass: �.)�filezInv. counter: Z_abc_z: )
�print�
__module__�__qualname__r�__dict__�
startswithr
r$rr)rr,rr
rrr�_dump_registryHs



��zABCMeta._dump_registrycCs	|j��dSr)r�clear�rrrr�_abc_registry_clearSszABCMeta._abc_registry_clearcCs	|j��|j��dSr)rr3rr4rrr�_abc_caches_clearWs
zABCMeta._abc_caches_clearcsd	|j}|�jvrdSt|�}||ur%�jtjkr |�jvr dS��|�St�fdd�||fD��S)NTFc3s�|]}��|�VqdSr)�__subclasscheck__)r�cr4rr�	<genexpr>js�z,ABCMeta.__instancecheck__.<locals>.<genexpr>)	r"rr%rrrrr7�any)r�instancer)Zsubtyperr4r�__instancecheck__\s
�

zABCMeta.__instancecheck__cCs	t|t�s
td��||jvrdS|jtjkr t�|_tj|_n||jvr'dS|�	|�}|t
urB|r:|j�|�|S|j�|�|S|t|dd�vrR|j�|�dS|j
D]}t||�re|j�|�dSqU|��D]}t||�rz|j�|�dSqj|j�|�dS)Nz"issubclass() arg 1 must be a classTF�__mro__r)r$r%r&rrrrrr�__subclasshook__�NotImplementedrr
rr'�__subclasses__)rr)�okZrcls�sclsrrrr7ls@




�

�
�zABCMeta.__subclasscheck__r)�__name__r.r/rrr*r2r5r6r<r7�
__classcell__rrr!rrs
rN)Z_weakrefsetrrr%rrrrr�<module>s

?>