Files
old-nlp/venv/lib/python3.7/__pycache__/abc.cpython-37.pyc

102 lines
6.3 KiB
Plaintext
Raw Normal View History

2019-10-20 13:16:49 +02:00
B
<00>x-]<5D><00>@s<>dZdd<02>ZGdd<04>de<02>ZGdd<06>de<04>ZGdd<08>de<06>Zy,d d
lm Z m
Z
m Z m Z m Z mZmZmZWn*ek
r<EFBFBD>d d lmZm Z d e_YnXGd d<0E>de<15>ZGdd<10>ded<11>ZdS)z3Abstract Base Classes (ABCs) according to PEP 3119.cCs
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)<01>__isabstractmethod__)Zfuncobj<62>r<00>;/home/hamo/projects/misc/adreader/venv/lib/python3.7/abc.py<70>abstractmethodsrcs$eZdZdZdZ<04>fdd<04>Z<05>ZS)<05>abstractclassmethodaJA 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.
Tcsd|_t<01><00>|<01>dS)NT)r<00>super<65>__init__)<02>self<6C>callable)<01> __class__rrr-szabstractclassmethod.__init__)<07>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rr<00> __classcell__rr)r
rrsrcs$eZdZdZdZ<04>fdd<04>Z<05>ZS)<05>abstractstaticmethodaJA 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.
Tcsd|_t<01><00>|<01>dS)NT)rrr)rr )r
rrrDszabstractstaticmethod.__init__)r r r rrrrrr)r
rr2src@seZdZdZdZdS)<04>abstractpropertyafA 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 rrrrrrrIsr<00>)<08>get_cache_token<65> _abc_init<69> _abc_register<65>_abc_instancecheck<63>_abc_subclasscheck<63> _get_dump<6D>_reset_registry<72> _reset_caches)<02>ABCMetar<00>abccsReZdZdZ<03>fdd<03>Zdd<05>Zdd<07>Zdd <09>Zdd d <0C>Zd d<0E>Z dd<10>Z
<EFBFBD>Z S)ra<>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<00>j||||f|<04>}t|<05>|S)N)r<00>__new__r)Zmcls<6C>nameZbasesZ namespace<63>kwargs<67>cls)r
rrr}szABCMeta.__new__cCs
t||<01>S)z{Register a virtual subclass of an ABC.
Returns the subclass, to allow usage as a class decorator.
)r)r <00>subclassrrr<00>register<65>szABCMeta.registercCs
t||<01>S)z'Override for isinstance(instance, cls).)r)r Zinstancerrr<00>__instancecheck__<5F>szABCMeta.__instancecheck__cCs
t||<01>S)z'Override for issubclass(subclass, cls).)r)r r!rrr<00>__subclasscheck__<5F>szABCMeta.__subclasscheck__NcCs<>td|j<01>d|j<02><00>|d<03>tdt<03><00><00>|d<03>t|<00>\}}}}td|<02><02>|d<03>td|<03><02>|d<03>td|<04><02>|d<03>td|<05><02>|d<03>d S)
z'Debug helper to print the ABC registry.zClass: <20>.)<01>filezInv. counter: z_abc_registry: z _abc_cache: z_abc_negative_cache: z_abc_negative_cache_version: N)<05>printr r rr)r r&Z _abc_registryZ
_abc_cacheZ_abc_negative_cacheZ_abc_negative_cache_versionrrr<00>_dump_registry<72>s
zABCMeta._dump_registrycCs t|<00>dS)z.Clear the registry (for debugging or testing).N)r)r rrr<00>_abc_registry_clear<61>szABCMeta._abc_registry_clearcCs t|<00>dS)z,Clear the caches (for debugging or testing).N)r)r rrr<00>_abc_caches_clear<61>szABCMeta._abc_caches_clear)N) r r r rrr"r#r$r(r)r*rrr)r
rrps  
rc@seZdZdZdZdS)<04>ABCzVHelper class that provides a standard way to create an ABC using
inheritance.
rN)r r r r<00> __slots__rrrrr+<00>sr+)<01> metaclassN)rr<00> classmethodr<00> staticmethodr<00>propertyrZ_abcrrrrrrrr<00> ImportErrorZ_py_abcrr <00>typer+rrrr<00><module>s, 6