Files
PowerToys/PythonEnv/2.7/Lib/abc.pyc

73 lines
6.4 KiB
Plaintext
Raw Normal View History

2013-12-21 01:22:42 +08:00
<03>
<EFBFBD><EFBFBD>uMc@s}dZddlZddlmZdd d<00><00>YZee<00><00>Zd<00>Zdefd<00><00>YZ d efd
<00><00>YZ
dS( s3Abstract Base Classes (ABCs) according to PEP 3119.i<><69><EFBFBD><EFBFBD>N(tWeakSett_CcBseZRS((t__name__t
__module__(((s@d:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\abc.pyR scCs t|_|S(s<>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, ...):
...
(tTruet__isabstractmethod__(tfuncobj((s@d:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\abc.pytabstractmethods tabstractpropertycBseZdZeZRS(s/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)
(RRt__doc__RR(((s@d:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\abc.pyR$stABCMetacBsDeZdZdZd<00>Zd<00>Zdd<00>Zd<00>Zd<00>Z RS(siMetaclass 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()).
icCs<>tt|<00>j||||<00>}td<00>|j<00>D<><00>}xb|D]Z}xQt|dt<00><00>D]:}t||d<00>}t|dt<00>r`|j|<00>q`q`WqDWt |<00>|_
t <00>|_ t <00>|_ t <00>|_tj|_|S(Ncss-|]#\}}t|dt<00>r|VqdS(RN(tgetattrtFalse(t.0tnametvalue((s@d:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\abc.pys <genexpr>Ys t__abstractmethods__R(tsuperR
t__new__tsettitemsR tNoneR taddt frozensetRRt _abc_registryt
_abc_cachet_abc_negative_cachet_abc_invalidation_countert_abc_negative_cache_version(tmclsRtbasest namespacetclst abstractstbaseR((s@d:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\abc.pyRVs!      cCs{t|ttjf<00>s'td<00><00>nt||<00>r:dSt||<00>rXtd<00><00>n|jj|<00>t j
d7_
dS(s&Register a virtual subclass of an ABC.sCan only register classesNs'Refusing to create an inheritance cyclei( t
isinstancettypettypest ClassTypet TypeErrort
issubclasst RuntimeErrorRRR
R(R tsubclass((s@d:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\abc.pytregisteriscCs<>|d|j|jfIJ|dtjIJxRt|jj<00><00>D];}|jd<00>rAt||<00>}|d||fIJqAqAWdS(s'Debug helper to print the ABC registry.s Class: %s.%ssInv.counter: %st_abc_s%s: %rN( RRR
Rtsortedt__dict__tkeyst
startswithR (R tfileRR((s@d:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\abc.pyt_dump_registryws cCs<>t|dd<00>}|dk r1||jkr1tSt|<00>}|tkrR|}n||ksj|dkr<>|jtjkr<>||j kr<>t
S|j |<00>S|j |<00>p<>|j |<00>S(s'Override for isinstance(instance, cls).t __class__N( R RRRR$t _InstanceTypeRR
RRR t__subclasscheck__(R tinstanceR*tsubtype((s@d:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\abc.pyt__instancecheck__<5F>s     cCsa||jkrtS|jtjkr@t<00>|_tj|_n||jkrStS|j|<00>}|t k r<>t
|t <00>s<>t <00>|r<>|jj |<00>n|jj |<00>|S|t|dd<00>kr<>|jj |<00>tSx4|jD])}t||<00>r<>|jj |<00>tSq<53>Wx7|j<00>D])}t||<00>r |jj |<00>tSq W|jj |<00>tS(s'Override for issubclass(subclass, cls).t__mro__((RRRR
RRRR t__subclasshook__tNotImplementedR#tbooltAssertionErrorRR RR(t__subclasses__(R R*toktrclstscls((s@d:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\abc.pyR5<00>s6  N(
RRR RRR+RR2R8R5(((s@d:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\abc.pyR
As   (( R R%t _weakrefsetRRR$R4RtpropertyRR
(((s@d:\github\WinAlfred\WinAlfred\bin\Debug\PythonEnv\2.7\lib\abc.pyt<module>s