B
    Áì2aÌ  ã               @   sº   d Z dd„ ZG dd„ deƒZG dd„ deƒZG dd„ deƒZy,d	d
lm	Z	m
Z
mZmZmZmZmZmZ W n* ek
r’   d	dlmZm	Z	 de_Y nX G dd„ deƒZG dd„ ded�ZdS )z3Abstract Base Classes (ABCs) according to PEP 3119.c             C   s
   d| _ | S )aÞ  A decorator indicating abstract methods.

    Requires that the metaclass is ABCMeta or derived from it.  A
    class that has a metaclass derived from ABCMeta cannot be
    instantiated unless all of its abstract methods are overridden.
    The abstract methods can be called using any of the normal
    'super' call mechanisms.

    Usage:

        class C(metaclass=ABCMeta):
            @abstractmethod
            def my_abstract_method(self, ...):
                ...
    T)Ú__isabstractmethod__)Zfuncobj© r   ú//var/www/html/prediksi/Python-3.7.12/Lib/abc.pyÚabstractmethod   s    r   c                   s$   e Zd ZdZdZ‡ fdd„Z‡  ZS )ÚabstractclassmethodaJ  A decorator indicating abstract classmethods.

    Similar to abstractmethod.

    Usage:

        class C(metaclass=ABCMeta):
            @abstractclassmethod
            def my_abstract_classmethod(cls, ...):
                ...

    'abstractclassmethod' is deprecated. Use 'classmethod' with
    'abstractmethod' instead.
    Tc                s   d|_ tƒ  |¡ d S )NT)r   ÚsuperÚ__init__)ÚselfÚcallable)Ú	__class__r   r   r   -   s    zabstractclassmethod.__init__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__classcell__r   r   )r
   r   r      s   r   c                   s$   e Zd ZdZdZ‡ fdd„Z‡  ZS )ÚabstractstaticmethodaJ  A decorator indicating abstract staticmethods.

    Similar to abstractmethod.

    Usage:

        class C(metaclass=ABCMeta):
            @abstractstaticmethod
            def my_abstract_staticmethod(...):
                ...

    'abstractstaticmethod' is deprecated. Use 'staticmethod' with
    'abstractmethod' instead.
    Tc                s   d|_ tƒ  |¡ d S )NT)r   r   r   )r   r	   )r
   r   r   r   D   s    zabstractstaticmethod.__init__)r   r   r   r   r   r   r   r   r   )r
   r   r   2   s   r   c               @   s   e Zd ZdZdZdS )Úabstractpropertyaf  A decorator indicating abstract properties.

    Requires that the metaclass is ABCMeta or derived from it.  A
    class that has a metaclass derived from ABCMeta cannot be
    instantiated unless all of its abstract properties are overridden.
    The abstract properties can be called using any of the normal
    'super' call mechanisms.

    Usage:

        class C(metaclass=ABCMeta):
            @abstractproperty
            def my_abstract_property(self):
                ...

    This defines a read-only property; you can also define a read-write
    abstract property using the 'long' form of property declaration:

        class C(metaclass=ABCMeta):
            def getx(self): ...
            def setx(self, value): ...
            x = abstractproperty(getx, setx)

    'abstractproperty' is deprecated. Use 'property' with 'abstractmethod'
    instead.
    TN)r   r   r   r   r   r   r   r   r   r   I   s   r   é    )Úget_cache_tokenÚ	_abc_initÚ_abc_registerÚ_abc_instancecheckÚ_abc_subclasscheckÚ	_get_dumpÚ_reset_registryÚ_reset_caches)ÚABCMetar   Úabcc                   sR   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zdd	„ Zddd„Zdd„ Z	dd„ Z
‡  ZS )r   a�  Metaclass for defining Abstract Base Classes (ABCs).

        Use this metaclass to create an ABC.  An ABC can be subclassed
        directly, and then acts as a mix-in class.  You can also register
        unrelated concrete classes (even built-in classes) and unrelated
        ABCs as 'virtual subclasses' -- these and their descendants will
        be considered subclasses of the registering ABC by the built-in
        issubclass() function, but the registering ABC won't show up in
        their MRO (Method Resolution Order) nor will method
        implementations defined by the registering ABC be callable (not
        even via super()).
        c                s"   t ƒ j| |||f|Ž}t|ƒ |S )N)r   Ú__new__r   )ZmclsÚnameZbasesZ	namespaceÚkwargsÚcls)r
   r   r   r   }   s    zABCMeta.__new__c             C   s
   t | |ƒS )z{Register a virtual subclass of an ABC.

            Returns the subclass, to allow usage as a class decorator.
            )r   )r    Úsubclassr   r   r   Úregister‚   s    zABCMeta.registerc             C   s
   t | |ƒS )z'Override for isinstance(instance, cls).)r   )r    Zinstancer   r   r   Ú__instancecheck__‰   s    zABCMeta.__instancecheck__c             C   s
   t | |ƒS )z'Override for issubclass(subclass, cls).)r   )r    r!   r   r   r   Ú__subclasscheck__�   s    zABCMeta.__subclasscheck__Nc             C   sŒ   t d| j› d| j› �|d� t dtƒ › �|d� t| ƒ\}}}}t d|›�|d� t d|›�|d� t d|›�|d� t d|›�|d� d	S )
z'Debug helper to print the ABC registry.zClass: Ú.)ÚfilezInv. counter: z_abc_registry: z_abc_cache: z_abc_negative_cache: z_abc_negative_cache_version: N)Úprintr   r   r   r   )r    r&   Z_abc_registryZ
_abc_cacheZ_abc_negative_cacheZ_abc_negative_cache_versionr   r   r   Ú_dump_registry‘   s    
zABCMeta._dump_registryc             C   s   t | ƒ dS )z.Clear the registry (for debugging or testing).N)r   )r    r   r   r   Ú_abc_registry_clear�   s    zABCMeta._abc_registry_clearc             C   s   t | ƒ dS )z,Clear the caches (for debugging or testing).N)r   )r    r   r   r   Ú_abc_caches_clear¡   s    zABCMeta._abc_caches_clear)N)r   r   r   r   r   r"   r#   r$   r(   r)   r*   r   r   r   )r
   r   r   p   s   
r   c               @   s   e Zd ZdZdZdS )ÚABCzVHelper class that provides a standard way to create an ABC using
    inheritance.
    r   N)r   r   r   r   Ú	__slots__r   r   r   r   r+   ¦   s   r+   )Ú	metaclassN)r   r   Úclassmethodr   Ústaticmethodr   Úpropertyr   Z_abcr   r   r   r   r   r   r   r   ÚImportErrorZ_py_abcr   r   Útyper+   r   r   r   r   Ú<module>   s   ,6