@@ -404,7 +404,7 @@ enumerations; the others auto-assign increasing integers starting with 1. A
404404new class derived from :class: `Enum ` is returned. In other words, the above
405405assignment to :class: `Animal ` is equivalent to::
406406
407- >>> class Animals (Enum):
407+ >>> class Animal (Enum):
408408 ... ant = 1
409409 ... bee = 2
410410 ... cat = 3
@@ -421,7 +421,7 @@ enumeration is being created in (e.g. it will fail if you use a utility
421421function in separate module, and also may not work on IronPython or Jython).
422422The solution is to specify the module name explicitly as follows::
423423
424- >>> Animals = Enum('Animals ', 'ant bee cat dog', module=__name__)
424+ >>> Animal = Enum('Animal ', 'ant bee cat dog', module=__name__)
425425
426426.. warning ::
427427
@@ -434,7 +434,7 @@ The new pickle protocol 4 also, in some circumstances, relies on
434434to find the class. For example, if the class was made available in class
435435SomeData in the global scope::
436436
437- >>> Animals = Enum('Animals ', 'ant bee cat dog', qualname='SomeData.Animals ')
437+ >>> Animal = Enum('Animal ', 'ant bee cat dog', qualname='SomeData.Animal ')
438438
439439The complete signature is::
440440
@@ -447,6 +447,10 @@ The complete signature is::
447447
448448 'red green blue' | 'red,green,blue' | 'red, green, blue'
449449
450+ or an iterator of names::
451+
452+ ['red', 'green', 'blue']
453+
450454 or an iterator of (name, value) pairs::
451455
452456 [('cyan', 4), ('magenta', 5), ('yellow', 6)]
0 commit comments