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
8be6fac1
Kaydet (Commit)
8be6fac1
authored
Kas 01, 2014
tarafından
Ethan Furman
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
standardize Enum docs by referring to 'special methods' instead of __dunder__ methods
üst
89122706
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
enum.rst
Doc/library/enum.rst
+5
-5
No files found.
Doc/library/enum.rst
Dosyayı görüntüle @
8be6fac1
...
...
@@ -314,11 +314,11 @@ Then::
>>> str(Mood.funky)
'my custom str! 1'
The rules for what is allowed are as follows:
_sunder_ names (starting and
ending with a single underscore) are reserved by enum and cannot be used;
a
ll other a
ttributes defined within an enumeration will become members of this
enumeration, with the exception of
*__dunder__* names and descriptors (methods
are also descriptors).
The rules for what is allowed are as follows:
names that start and end with a
with a single underscore are reserved by enum and cannot be used; all other
attributes defined within an enumeration will become members of this
enumeration, with the exception of
special methods (:meth:`__str__`,
:meth:`__add__`, etc.) and descriptors (methods
are also descriptors).
Note: if your enumeration defines :meth:`__new__` and/or :meth:`__init__` then
whatever value(s) were given to the enum member will be passed into those
...
...
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