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
dd4fcf52
Kaydet (Commit)
dd4fcf52
authored
Haz 03, 2016
tarafından
R David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#26829: Clarify that namespace is copied to a new __dict__ in instance creation.
Patch by Emily Morehouse.
üst
a32c738a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
functions.rst
Doc/library/functions.rst
+3
-2
datamodel.rst
Doc/reference/datamodel.rst
+5
-0
ACKS
Misc/ACKS
+1
-0
No files found.
Doc/library/functions.rst
Dosyayı görüntüle @
dd4fcf52
...
...
@@ -1449,8 +1449,9 @@ are always available. They are listed here in alphabetical order.
class name and becomes the :attr:`~class.__name__` attribute; the *bases*
tuple itemizes the base classes and becomes the :attr:`~class.__bases__`
attribute; and the *dict* dictionary is the namespace containing definitions
for class body and becomes the :attr:`~object.__dict__` attribute. For
example, the following two statements create identical :class:`type` objects:
for class body and is copied to a standard dictionary to become the
:attr:`~object.__dict__` attribute. For example, the following two
statements create identical :class:`type` objects:
>>> class X:
... a = 1
...
...
Doc/reference/datamodel.rst
Dosyayı görüntüle @
dd4fcf52
...
...
@@ -1734,6 +1734,11 @@ After the class object is created, it is passed to the class decorators
included in the class definition (if any) and the resulting object is bound
in the local namespace as the defined class.
When a new class is created by ``type.__new__``, the object provided as the
namespace parameter is copied to a standard Python dictionary and the original
object is discarded. The new copy becomes the :attr:`~object.__dict__` attribute
of the class object.
.. seealso::
:pep:`3135` - New super
...
...
Misc/ACKS
Dosyayı görüntüle @
dd4fcf52
...
...
@@ -999,6 +999,7 @@ Peter Moody
Paul Moore
Ross Moore
Ben Morgan
Emily Morehouse
Derek Morr
James A Morrison
Martin Morrison
...
...
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