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
61f50bb4
Kaydet (Commit)
61f50bb4
authored
Ock 15, 2015
tarafından
Ethan Furman
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue22997: minor doc update; thanks to Simoen Visser
üst
e62430ed
8a123292
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
enum.rst
Doc/library/enum.rst
+7
-3
No files found.
Doc/library/enum.rst
Dosyayı görüntüle @
61f50bb4
...
...
@@ -405,7 +405,7 @@ the ``start`` parameter to specify a different starting value). A
new class derived from :class:`Enum` is returned. In other words, the above
assignment to :class:`Animal` is equivalent to::
>>> class Animal
s
(Enum):
>>> class Animal(Enum):
... ant = 1
... bee = 2
... cat = 3
...
...
@@ -422,7 +422,7 @@ enumeration is being created in (e.g. it will fail if you use a utility
function in separate module, and also may not work on IronPython or Jython).
The solution is to specify the module name explicitly as follows::
>>> Animal
s = Enum('Animals
', 'ant bee cat dog', module=__name__)
>>> Animal
= Enum('Animal
', 'ant bee cat dog', module=__name__)
.. warning::
...
...
@@ -435,7 +435,7 @@ The new pickle protocol 4 also, in some circumstances, relies on
to find the class. For example, if the class was made available in class
SomeData in the global scope::
>>> Animal
s = Enum('Animals', 'ant bee cat dog', qualname='SomeData.Animals
')
>>> Animal
= Enum('Animal', 'ant bee cat dog', qualname='SomeData.Animal
')
The complete signature is::
...
...
@@ -448,6 +448,10 @@ The complete signature is::
'red green blue' | 'red,green,blue' | 'red, green, blue'
or an iterator of names::
['red', 'green', 'blue']
or an iterator of (name, value) pairs::
[('cyan', 4), ('magenta', 5), ('yellow', 6)]
...
...
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