Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
5c117dd2
Unverified
Kaydet (Commit)
5c117dd2
authored
Ara 31, 2018
tarafından
Serhiy Storchaka
Kaydeden (comit)
GitHub
Ara 31, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-35609: Remove examples for deprecated decorators in the abc module. (GH-11355)
üst
7108aab4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
46 deletions
+5
-46
abc.py
Lib/abc.py
+5
-46
No files found.
Lib/abc.py
Dosyayı görüntüle @
5c117dd2
...
@@ -11,7 +11,8 @@ def abstractmethod(funcobj):
...
@@ -11,7 +11,8 @@ def abstractmethod(funcobj):
class that has a metaclass derived from ABCMeta cannot be
class that has a metaclass derived from ABCMeta cannot be
instantiated unless all of its abstract methods are overridden.
instantiated unless all of its abstract methods are overridden.
The abstract methods can be called using any of the normal
The abstract methods can be called using any of the normal
'super' call mechanisms.
'super' call mechanisms. abstractmethod() may be used to declare
abstract methods for properties and descriptors.
Usage:
Usage:
...
@@ -27,17 +28,7 @@ def abstractmethod(funcobj):
...
@@ -27,17 +28,7 @@ def abstractmethod(funcobj):
class
abstractclassmethod
(
classmethod
):
class
abstractclassmethod
(
classmethod
):
"""A decorator indicating abstract classmethods.
"""A decorator indicating abstract classmethods.
Similar to abstractmethod.
Deprecated, use 'classmethod' with 'abstractmethod' instead.
Usage:
class C(metaclass=ABCMeta):
@abstractclassmethod
def my_abstract_classmethod(cls, ...):
...
'abstractclassmethod' is deprecated. Use 'classmethod' with
'abstractmethod' instead.
"""
"""
__isabstractmethod__
=
True
__isabstractmethod__
=
True
...
@@ -50,17 +41,7 @@ class abstractclassmethod(classmethod):
...
@@ -50,17 +41,7 @@ class abstractclassmethod(classmethod):
class
abstractstaticmethod
(
staticmethod
):
class
abstractstaticmethod
(
staticmethod
):
"""A decorator indicating abstract staticmethods.
"""A decorator indicating abstract staticmethods.
Similar to abstractmethod.
Deprecated, use 'staticmethod' with 'abstractmethod' instead.
Usage:
class C(metaclass=ABCMeta):
@abstractstaticmethod
def my_abstract_staticmethod(...):
...
'abstractstaticmethod' is deprecated. Use 'staticmethod' with
'abstractmethod' instead.
"""
"""
__isabstractmethod__
=
True
__isabstractmethod__
=
True
...
@@ -73,29 +54,7 @@ class abstractstaticmethod(staticmethod):
...
@@ -73,29 +54,7 @@ class abstractstaticmethod(staticmethod):
class
abstractproperty
(
property
):
class
abstractproperty
(
property
):
"""A decorator indicating abstract properties.
"""A decorator indicating abstract properties.
Requires that the metaclass is ABCMeta or derived from it. A
Deprecated, use 'property' with 'abstractmethod' instead.
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.
"""
"""
__isabstractmethod__
=
True
__isabstractmethod__
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment