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
5c174bbd
Kaydet (Commit)
5c174bbd
authored
Eki 21, 2007
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add markup to new function descriptions.
üst
63fa1683
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
inspect.rst
Doc/library/inspect.rst
+19
-18
No files found.
Doc/library/inspect.rst
Dosyayı görüntüle @
5c174bbd
...
...
@@ -265,30 +265,31 @@ Note:
.. function:: ismethoddescriptor(object)
Return true if the object is a method descriptor, but not if
ismethod() or
isclass() or isfunction()
are true.
Return true if the object is a method descriptor, but not if
:func:`ismethod`
or :func:`isclass` or :func:`isfunction`
are true.
This is new as of Python 2.2, and, for example, is true of
int.__add__. An
object passing this test has a __get__ attribute but not a __set__ attribute,
but
beyond that the set of attributes varies. __name__ is usually sensible, and
__doc__
often is.
This is new as of Python 2.2, and, for example, is true of
``int.__add__``. An object passing this test has a :attr:`__get__` attribute
but
not a :attr:`__set__` attribute, but beyond that the set of attributes
varies. :attr:`__name__` is usually sensible, and :attr:`__doc__`
often is.
Methods implemented via descriptors that also pass one of the other tests
return
false from the ismethoddescriptor() test, simply because the other tests promis
e
more -- you can, e.g., count on having the im_func attribute (etc) when an
object passes ismethod()
.
Methods implemented via descriptors that also pass one of the other tests
return false from the :func:`ismethoddescriptor` test, simply because th
e
other tests promise more -- you can, e.g., count on having the
:attr:`im_func` attribute (etc) when an object passes :func:`ismethod`
.
.. function:: isdatadescriptor(object)
Return true if the object is a data descriptor.
Data descriptors have both a __get__ and a __set__ attribute. Examples are
properties (defined in Python), getsets, and members. The latter two are
defined in C and there are more specific tests available for those types, which
is robust across Python implementations. Typically, data descriptors will also
have __name__ and __doc__ attributes (properties, getsets, and members have both
of these attributes), but this is not guaranteed.
Data descriptors have both a :attr:`__get__` and a :attr:`__set__` attribute.
Examples are properties (defined in Python), getsets, and members. The
latter two are defined in C and there are more specific tests available for
those types, which is robust across Python implementations. Typically, data
descriptors will also have :attr:`__name__` and :attr:`__doc__` attributes
(properties, getsets, and members have both of these attributes), but this is
not guaranteed.
.. versionadded:: 2.3
...
...
@@ -309,8 +310,8 @@ Note:
Return true if the object is a member descriptor.
Member descriptors are attributes defined in extension modules via
``PyMemberDef`` structures. For Python implementations without such types,
this
method will always return ``False``.
``PyMemberDef`` structures. For Python implementations without such types,
this
method will always return ``False``.
.. versionadded:: 2.5
...
...
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