91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 25.78MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2023-07-23
  • 語言: Python
  • 標簽: python??pypy??

資源簡介

python pypy

資源截圖

代碼片段和文件信息

#?Copyright?2007?Google?Inc.?All?Rights?Reserved.
#?Licensed?to?PSF?under?a?Contributor?Agreement.

“““Abstract?base?Classes?(ABCs)?according?to?PEP?3119.“““

import?types

from?_weakrefset?import?WeakSet

#?Instance?of?old-style?class
class?_C:?pass
_InstanceType?=?type(_C())


def?abstractmethod(funcobj):
????“““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?...):
????????????????...
????“““
????funcobj.__isabstractmethod__?=?True
????return?funcobj


class?abstractproperty(property):
????“““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)
????“““
????__isabstractmethod__?=?True


class?ABCmeta(type):

????“““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()).

????“““

????#?A?global?counter?that?is?incremented?each?time?a?class?is
????#?registered?as?a?virtual?subclass?of?anything.??It?forces?the
????#?negative?cache?to?be?cleared?before?its?next?use.
????_abc_invalidation_counter?=?0

????def?__new__(mcls?name?bases?namespace):
????????cls?=?super(ABCmeta?mcls).__new__(mcls?name?bases?namespace)
????????#?Compute?set?of?abstract?method?names
????????abstracts?=?set(name
?????????????????????for?name?value?in?namespace.items()
?????????????????????if?getattr(value?“__isabstractmethod__“?False))
????????for?base?in?bases:
????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-06-07?14:18??pypy2-v5.8.0-win32\
?????目錄???????????0??2017-06-07?14:18??pypy2-v5.8.0-win32\site-packages\
?????文件?????????119??2017-06-06?05:22??pypy2-v5.8.0-win32\site-packages\README
?????目錄???????????0??2017-06-07?14:18??pypy2-v5.8.0-win32\include\
?????文件?????????748??2017-06-06?03:29??pypy2-v5.8.0-win32\include\code.h
?????文件????????2215??2017-06-06?03:27??pypy2-v5.8.0-win32\include\PyPy.h
?????文件????????2245??2017-06-06?03:29??pypy2-v5.8.0-win32\include\stringobject.h
?????文件????????3747??2017-06-06?03:29??pypy2-v5.8.0-win32\include\modsupport.h
?????文件?????????305??2017-06-06?03:29??pypy2-v5.8.0-win32\include\dictobject.h
?????文件????????1369??2017-06-06?03:29??pypy2-v5.8.0-win32\include\eval.h
?????文件??????????12??2017-06-06?03:29??pypy2-v5.8.0-win32\include\longintrepr.h
?????文件????????6256??2017-06-06?03:29??pypy2-v5.8.0-win32\include\pypy_macros.h
?????文件????????1723??2017-06-06?03:29??pypy2-v5.8.0-win32\include\pythonrun.h
?????文件?????????850??2017-06-06?03:29??pypy2-v5.8.0-win32\include\tupleobject.h
?????文件?????????464??2017-06-06?03:29??pypy2-v5.8.0-win32\include\complexobject.h
?????文件????????3611??2017-06-06?03:29??pypy2-v5.8.0-win32\include\pypy_numpy.h
?????文件???????11012??2017-06-06?03:29??pypy2-v5.8.0-win32\include\object.h
?????文件????????3063??2017-06-06?03:29??pypy2-v5.8.0-win32\include\pyport.h
?????文件?????????621??2017-06-06?03:29??pypy2-v5.8.0-win32\include\funcobject.h
?????文件????????2142??2017-06-06?03:29??pypy2-v5.8.0-win32\include\structmember.h
?????文件?????????442??2017-06-06?03:29??pypy2-v5.8.0-win32\include\longobject.h
?????文件?????????940??2017-06-06?03:29??pypy2-v5.8.0-win32\include\pythread.h
?????文件????????1971??2017-06-06?03:29??pypy2-v5.8.0-win32\include\datetime.h
?????文件????????1735??2017-06-06?03:29??pypy2-v5.8.0-win32\include\pycapsule.h
?????文件????????1685??2017-06-06?03:29??pypy2-v5.8.0-win32\include\pycobject.h
?????文件??????????44??2017-06-06?03:29??pypy2-v5.8.0-win32\include\fileobject.h
?????文件?????????345??2017-06-06?03:29??pypy2-v5.8.0-win32\include\traceback.h
?????文件?????????157??2017-06-06?03:29??pypy2-v5.8.0-win32\include\compile.h
?????文件?????????302??2017-06-06?03:29??pypy2-v5.8.0-win32\include\frameobject.h
?????文件????????1022??2017-06-06?03:29??pypy2-v5.8.0-win32\include\abstract.h
?????文件??????????12??2017-06-06?03:29??pypy2-v5.8.0-win32\include\ceval.h
............此處省略3313個文件信息

評論

共有 條評論