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
e6c0f0d9
Kaydet (Commit)
e6c0f0d9
authored
Eki 24, 2012
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
#16210: merge with 3.2.
üst
f0ef7fea
837cd06d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
15 deletions
+12
-15
functions.rst
Doc/library/functions.rst
+11
-15
ACKS
Misc/ACKS
+1
-0
No files found.
Doc/library/functions.rst
Dosyayı görüntüle @
e6c0f0d9
...
...
@@ -1323,29 +1323,25 @@ are always available. They are listed here in alphabetical order.
.. function:: type(object)
type(name, bases, dict)
.. index:: object: type
Return the type of an *object*. The return value is a type object and
generally the same object as returned by ``object.__class__``.
With one argument, return the type of an *object*. The return value is a
type object and generally the same object as returned by ``object.__class__``.
The :func:`isinstance` built-in function is recommended for testing the type
of an object, because it takes subclasses into account.
With three arguments, :func:`type` functions as a constructor as detailed
below.
.. function:: type(name, bases, dict)
:noindex:
Return a new type object. This is essentially a dynamic form of the
:keyword:`class` statement. The *name* string is the class name and become
s the
:attr:`__name__` attribute; the *bases* tuple itemizes the base classes and
becomes the :attr:`__bases__` attribute; and the *dict* dictionary is the
namespace containing definitions for class body and becomes the :attr:`__dict__`
attribute. For example, the following two statements create identical
:class:`type` objects:
With three arguments, return a new type object. This is essentially a
dynamic form of the :keyword:`class` statement. The *name* string i
s the
class name and becomes the :attr:`__name__` attribute; the *bases* tuple
itemizes the base classes and becomes the :attr:`__bases__` attribute;
and the *dict* dictionary is the namespace containing definitions for class
body and becomes the :attr:`__dict__` attribute. For example, the
following two statements create identical
:class:`type` objects:
>>> class X:
... a = 1
...
...
Misc/ACKS
Dosyayı görüntüle @
e6c0f0d9
...
...
@@ -1059,6 +1059,7 @@ Iñigo Serna
Joakim Sernbrant
Roger D. Serwy
Jerry Seutter
Pete Sevander
Denis Severson
Ian Seyer
Ha Shao
...
...
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