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
ed5fba2a
Kaydet (Commit)
ed5fba2a
authored
Şub 22, 2013
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#17035: use new style classes in classmethod/staticmethod examples. Patch by Berker Peksag.
üst
13cee169
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
functions.rst
Doc/library/functions.rst
+6
-4
No files found.
Doc/library/functions.rst
Dosyayı görüntüle @
ed5fba2a
...
@@ -162,9 +162,10 @@ available. They are listed here in alphabetical order.
...
@@ -162,9 +162,10 @@ available. They are listed here in alphabetical order.
instance method receives the instance. To declare a class method, use this
instance method receives the instance. To declare a class method, use this
idiom::
idiom::
class C:
class C
(object)
:
@classmethod
@classmethod
def f(cls, arg1, arg2, ...): ...
def f(cls, arg1, arg2, ...):
...
The ``@classmethod`` form is a function :term:`decorator` -- see the description
The ``@classmethod`` form is a function :term:`decorator` -- see the description
of function definitions in :ref:`function` for details.
of function definitions in :ref:`function` for details.
...
@@ -1303,9 +1304,10 @@ available. They are listed here in alphabetical order.
...
@@ -1303,9 +1304,10 @@ available. They are listed here in alphabetical order.
A static method does not receive an implicit first argument. To declare a static
A static method does not receive an implicit first argument. To declare a static
method, use this idiom::
method, use this idiom::
class C:
class C
(object)
:
@staticmethod
@staticmethod
def f(arg1, arg2, ...): ...
def f(arg1, arg2, ...):
...
The ``@staticmethod`` form is a function :term:`decorator` -- see the
The ``@staticmethod`` form is a function :term:`decorator` -- see the
description of function definitions in :ref:`function` for details.
description of function definitions in :ref:`function` for details.
...
...
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