Files
952-11/env/python/dll/Python312/Lib/__pycache__/abc.cpython-312.pyc
T

94 lines
7.9 KiB
Plaintext
Raw Normal View History

2024-08-19 17:05:14 +08:00
Ë
*åfFãóâ—dZd„ZGd„de«ZGd„de«ZGd„de«Z dd lm Z m
Z
m Z m Z m
Z
mZmZmZGd
„d e«Zd„ZGd„de¬«Zy#e$rdd lmZm Z d
e_YŒ&wxYw)z3Abstract Base Classes (ABCs) according to PEP 3119.có—d|_|S)aIA 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. abstractmethod() may be used to declare
abstract methods for properties and descriptors.
Usage:
class C(metaclass=ABCMeta):
@abstractmethod
def my_abstract_method(self, arg1, arg2, argN):
...
T)Ú__isabstractmethod__)Úfuncobjs ú?c:\Users\RCi\AppData\Local\Programs\Python\Python312\Lib\abc.pyÚabstractmethodrs€ð"$(€GÔ Ø €Nócó&‡—eZdZdZdZˆfd„ZˆxZS)ÚabstractclassmethodaA decorator indicating abstract classmethods.
Deprecated, use 'classmethod' with 'abstractmethod' instead:
class C(ABC):
@classmethod
@abstractmethod
def my_abstract_classmethod(cls, ...):
...
Tcó2•—d|_t‰|� |«y©NT©rÚsuperÚ__init__©ÚselfÚcallableÚ __class__s €rrzabstractclassmethod.__init__+󸀨(,ˆÔ%Ü
‰Ñ˜Õ"r©Ú__name__Ú
__module__Ú __qualname__Ú__doc__rrÚ
__classcell__©rs@rr r óø„ñ
ð Ð÷#ð#rr có&‡—eZdZdZdZˆfd„ZˆxZS)ÚabstractstaticmethodaA decorator indicating abstract staticmethods.
Deprecated, use 'staticmethod' with 'abstractmethod' instead:
class C(ABC):
@staticmethod
@abstractmethod
def my_abstract_staticmethod(...):
...
Tcó2•—d|_t‰|� |«yr r rs €rrzabstractstaticmethod.__init__?rrrrs@rrr0rrrcó—eZdZdZdZy)ÚabstractpropertyzùA decorator indicating abstract properties.
Deprecated, use 'property' with 'abstractmethod' instead:
class C(ABC):
@property
@abstractmethod
def my_abstract_property(self):
...
TN)rrrrr©rrr r Ds„ñ
ð Ñrr é)Úget_cache_tokenÚ _abc_initÚ
_abc_registerÚ_abc_instancecheckÚ_abc_subclasscheckÚ _get_dumpÚ_reset_registryÚ
_reset_cachescóH‡—eZdZdZˆfd„Zd„Zd„Zd„Zd d„Zd„Z d„Z
ˆxZ S)
ÚABCMetaa�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 óD•—t‰|�||||fi|¤Ž}t|«|S©N)r
Ú__new__r$)ÚmclsÚnameÚbasesÚ namespaceÚkwargsÚclsrs €rr/zABCMeta.__new__is(ø€Ü‘'‘/ $¨¨e°YÑIÀ&ÑIˆCÜ �cŒN؈Jrcó—t||«S)z{Register a virtual subclass of an ABC.
Returns the subclass, to allow usage as a class decorator.
)r%©r5Úsubclasss rÚregisterzABCMeta.registerns€ô
!  hÓ/Ð /rcó—t||«S)z'Override for isinstance(instance, cls).)r&)r5Úinstances rÚ__instancecheck__zABCMeta.__instancecheck__uó€ä% c¨8Ó4Ð 4rcó—t||«S)z'Override for issubclass(subclass, cls).)r'r7s rÚ__subclasscheck__zABCMeta.__subclasscheck__yr=rcó"—td|j›d|j›�|¬«tdt«›�|¬«t |«\}}}}td|›�|¬«td|›�|¬«td|›�|¬«td|›�|¬«y )
z'Debug helper to print the ABC registry.zClass: ú.)ÚfilezInv. counter: z_abc_registry: z _abc_cache: z_abc_negative_cache: z_abc_negative_cache_version: N)Úprintrrr#r()r5rBÚ
_abc_registryÚ
_abc_cacheÚ_abc_negative_cacheÚ_abc_negative_cache_versions rÚ_dump_registryzABCMeta._dump_registry}sž€ä �G˜CŸN™NÐ+¨1¨S×-=Ñ-=Ð,>Ð?ÀdÕ KÜ �N¤?Ó#4Ð"5Ð6¸TÕ Bä,5°c«Nñ
*ˆ]˜JÐ(;Ø
(Ü �O MÐ#4Ð5¸DÕ AÜ �L  Ð/°dÕ ;Ü Ð)Ð*=Ð)@ÐAÈÕ MÜ Ð1Ð2MÐ1PÐQØö
rcó—t|«y)z.Clear the registry (for debugging or testing).N)r)©r5s rÚ_abc_registry_clearzABCMeta._abc_registry_clear‰s
€ä ˜CÕ rcó—t|«y)z,Clear the caches (for debugging or testing).N)r*rJs rÚ_abc_caches_clearzABCMeta._abc_caches_clear�s
€ä ˜#Õ rr.) rrrrr/r9r<r?rHrKrMrrs@rr,r,\s+ø„ñ ô ò
 0ò 5ò 5ó
ò !ö rr,)r,r#Úabccóv—t|d«s|St«}|jD]@}t|dd«D].}t||d«}t|dd«sŒ|j |«Œ0ŒB|j
j
«D]$\}}t|dd«sŒ|j |«Œ&t|«|_|S)a›Recalculate the set of abstract methods of an abstract class.
If a class has had one of its abstract methods implemented after the
class was created, the method will not be considered implemented until
this function is called. Alternatively, if a new abstract method has been