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
e7fb7008
Kaydet (Commit)
e7fb7008
authored
Nis 14, 2013
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
The im_class of unbound class methods is actually not the same as im_self.
üst
d4c45a91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
datamodel.rst
Doc/reference/datamodel.rst
+4
-5
No files found.
Doc/reference/datamodel.rst
Dosyayı görüntüle @
e7fb7008
...
@@ -623,9 +623,8 @@ Callable types
...
@@ -623,9 +623,8 @@ Callable types
single: im_self (method attribute)
single: im_self (method attribute)
When a user-defined method object is created by retrieving a class method object
When a user-defined method object is created by retrieving a class method object
from a class or instance, its :attr:`im_self` attribute is the class itself (the
from a class or instance, its :attr:`im_self` attribute is the class itself, and
same as the :attr:`im_class` attribute), and its :attr:`im_func` attribute is
its :attr:`im_func` attribute is the function object underlying the class method.
the function object underlying the class method.
When an unbound user-defined method object is called, the underlying function
When an unbound user-defined method object is called, the underlying function
(:attr:`im_func`) is called, with the restriction that the first argument must
(:attr:`im_func`) is called, with the restriction that the first argument must
...
@@ -797,8 +796,8 @@ Classes
...
@@ -797,8 +796,8 @@ Classes
associated class is either :class:`C` or one of its base classes, it is
associated class is either :class:`C` or one of its base classes, it is
transformed into an unbound user-defined method object whose :attr:`im_class`
transformed into an unbound user-defined method object whose :attr:`im_class`
attribute is :class:`C`. When it would yield a class method object, it is
attribute is :class:`C`. When it would yield a class method object, it is
transformed into a bound user-defined method object whose
:attr:`im_class`
transformed into a bound user-defined method object whose
and :attr:`im_self` attributes are both
:class:`C`. When it would yield a
:attr:`im_self` attribute is
:class:`C`. When it would yield a
static method object, it is transformed into the object wrapped by the static
static method object, it is transformed into the object wrapped by the static
method object. See section :ref:`descriptors` for another way in which
method object. See section :ref:`descriptors` for another way in which
attributes retrieved from a class may differ from those actually contained in
attributes retrieved from a class may differ from those actually contained in
...
...
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