Your IP : 18.217.89.130


Current Path : /opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/__pycache__/abc.cpython-35.opt-2.pyc



���]�!�@s�ddlmZdd�ZGdd�de�ZGdd�de�ZGdd	�d	e�ZGd
d�de	�Z
Gdd
�d
de
�Zdd�ZdS)�)�WeakSetcCs
d|_|S)NT)�__isabstractmethod__)�funcobj�r�(/opt/alt/python35/lib64/python3.5/abc.py�abstractmethod	s	rcs(eZdZdZ�fdd�Z�S)�abstractclassmethodTcsd|_t�j|�dS)NT)r�super�__init__)�self�callable)�	__class__rrr
0s	zabstractclassmethod.__init__)�__name__�
__module__�__qualname__rr
rr)r
rrsrcs(eZdZdZ�fdd�Z�S)�abstractstaticmethodTcsd|_t�j|�dS)NT)rr	r
)rr)r
rrr
Hs	zabstractstaticmethod.__init__)rrrrr
rr)r
rr5src@seZdZdZdS)�abstractpropertyTN)rrrrrrrrrMsrcs[eZdZdZ�fdd�Zdd�Zddd�Zd	d
�Zdd�Z�S)
�ABCMetarcs�t�j||||�}dd�|j�D�}x_|D]W}xNt|dt��D]7}t||d�}t|dd�rW|j|�qWWq;Wt|�|_t�|_	t�|_
t�|_tj
|_|S)NcSs.h|]$\}}t|dd�r|�qS)rF)�getattr)�.0�name�valuerrr�	<setcomp>�s		z"ABCMeta.__new__.<locals>.<setcomp>�__abstractmethods__rF)r	�__new__�itemsr�set�add�	frozensetrr�
_abc_registry�
_abc_cache�_abc_negative_cacher�_abc_invalidation_counter�_abc_negative_cache_version)�mclsr�bases�	namespace�cls�	abstracts�baser)r
rrr�s	
zABCMeta.__new__cCslt|t�std��t||�r.|St||�rItd��|jj|�tjd7_|S)NzCan only register classesz'Refusing to create an inheritance cycle�)	�
isinstance�type�	TypeError�
issubclass�RuntimeErrorrrrr")r'�subclassrrr�register�szABCMeta.registerNcCs�td|j|jfd|�tdtjd|�xUt|jj��D]>}|jd�rMt	||�}td||fd|�qMWdS)NzClass: %s.%s�filezInv.counter: %s�_abc_z%s: %r)
�printrrrr"�sorted�__dict__�keys�
startswithr)r'r2rrrrr�_dump_registry�s zABCMeta._dump_registrycs�|j}|�jkrdSt|�}||krf�jtjkrY|�jkrYdS�j|�St�fdd�||hD��S)NTFc3s|]}�j|�VqdS)N)�__subclasscheck__)r�c)r'rr�	<genexpr>�sz,ABCMeta.__instancecheck__.<locals>.<genexpr>)	r
r r,r#rr"r!r:�any)r'�instancer0�subtyper)r'r�__instancecheck__�s	
zABCMeta.__instancecheck__cCsL||jkrdS|jtjkr@t�|_tj|_n||jkrSdS|j|�}|tk	r�|r�|jj|�n|jj|�|S|t	|df�kr�|jj|�dSx4|j
D])}t||�r�|jj|�dSq�Wx7|j�D])}t||�r|jj|�dSqW|jj|�dS)NTF�__mro__)
r r#rr"rr!�__subclasshook__�NotImplementedrrrr.�__subclasses__)r'r0�ok�rcls�sclsrrrr:�s4zABCMeta.__subclasscheck__)	rrrr"rr1r9r@r:rr)r
rrms	rc@seZdZdS)�ABCN)rrrrrrrrH�srH�	metaclasscCstjS)N)rr"rrrr�get_cache_token�srJN)
�_weakrefsetrr�classmethodr�staticmethodr�propertyrr,rrHrJrrrr�<module>s }

?>