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
c4faeea9
Kaydet (Commit)
c4faeea9
authored
Nis 07, 2009
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix nits
üst
15efcb6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
datamodel.rst
Doc/reference/datamodel.rst
+5
-5
No files found.
Doc/reference/datamodel.rst
Dosyayı görüntüle @
c4faeea9
...
...
@@ -1564,13 +1564,13 @@ to remember the order that class members were defined::
>>> A.members
('__module__', 'one', 'two', 'three', 'four')
When the class definition for *A* get
executed, the first step is calling the
metaclass's :meth:`__prepare__` method which returns an empty
When the class definition for *A* get
s executed, the process begins with
calling the
metaclass's :meth:`__prepare__` method which returns an empty
:class:`collections.OrderedDict`. That mapping records the methods and
attributes of *A* as they are defined within the body of the class statement.
Once those definitions are executed, the ordered dict
is fully populated, an
d
then the metaclass's :meth:`__new__ ` method gets invoked.
That method builds
the new type and
saves the keys for the ordered dictionary
in an attribute
Once those definitions are executed, the ordered dict
ionary is fully populate
d
and the metaclass's :meth:`__new__ ` method gets invoked.
That method builds
the new type and
it saves the ordered dictionary keys
in an attribute
called *members*.
...
...
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