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
e0054c51
Kaydet (Commit)
e0054c51
authored
Agu 19, 2011
tarafından
Éric Araujo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Link isinstance/issubclass to the ABC glossary entry (#12256)
üst
f06568cb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
glossary.rst
Doc/glossary.rst
+4
-1
functions.rst
Doc/library/functions.rst
+6
-3
No files found.
Doc/glossary.rst
Dosyayı görüntüle @
e0054c51
...
...
@@ -30,7 +30,10 @@ Glossary
Abstract base classes complement :term:`duck-typing` by
providing a way to define interfaces when other techniques like
:func:`hasattr` would be clumsy or subtly wrong (for example with
:ref:`magic methods <new-style-special-lookup>`). Python comes with many built-in ABCs for
:ref:`magic methods <new-style-special-lookup>`). ABCs introduce virtual
subclasses, which are classes that don't inherit from a class but are
still recognized by :func:`isinstance` and :func:`issubclass`; see the
:mod:`abc` module documentation. Python comes with many built-in ABCs for
data structures (in the :mod:`collections` module), numbers (in the
:mod:`numbers` module), and streams (in the :mod:`io` module). You can
create your own ABCs with the :mod:`abc` module.
...
...
Doc/library/functions.rst
Dosyayı görüntüle @
e0054c51
...
...
@@ -624,9 +624,11 @@ available. They are listed here in alphabetical order.
.. function:: isinstance(object, classinfo)
Return true if the *object* argument is an instance of the *classinfo* argument,
or of a (direct or indirect) subclass thereof. Also return true if *classinfo*
or of a (direct, indirect or :term:`virtual <abstract base class>`) subclass
thereof. Also return true if *classinfo*
is a type object (new-style class) and *object* is an object of that type or of
a (direct or indirect) subclass thereof. If *object* is not a class instance or
a (direct, indirect or :term:`virtual <abstract base class>`) subclass
thereof. If *object* is not a class instance or
an object of the given type, the function always returns false. If *classinfo*
is neither a class object nor a type object, it may be a tuple of class or type
objects, or may recursively contain other such tuples (other sequence types are
...
...
@@ -639,7 +641,8 @@ available. They are listed here in alphabetical order.
.. function:: issubclass(class, classinfo)
Return true if *class* is a subclass (direct or indirect) of *classinfo*. A
Return true if *class* is a subclass (direct, indirect or :term:`virtual
<abstract base class>`) of *classinfo*. A
class is considered a subclass of itself. *classinfo* may be a tuple of class
objects, in which case every entry in *classinfo* will be checked. In any other
case, a :exc:`TypeError` exception is raised.
...
...
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