@@ -405,7 +405,7 @@ the ``start`` parameter to specify a different starting value). A
405405new class derived from :class: `Enum ` is returned. In other words, the above
406406assignment to :class: `Animal ` is equivalent to::
407407
408- >>> class Animals (Enum):
408+ >>> class Animal (Enum):
409409 ... ant = 1
410410 ... bee = 2
411411 ... cat = 3
@@ -422,7 +422,7 @@ enumeration is being created in (e.g. it will fail if you use a utility
422422function in separate module, and also may not work on IronPython or Jython).
423423The solution is to specify the module name explicitly as follows::
424424
425- >>> Animals = Enum('Animals ', 'ant bee cat dog', module=__name__)
425+ >>> Animal = Enum('Animal ', 'ant bee cat dog', module=__name__)
426426
427427.. warning ::
428428
@@ -435,7 +435,7 @@ The new pickle protocol 4 also, in some circumstances, relies on
435435to find the class. For example, if the class was made available in class
436436SomeData in the global scope::
437437
438- >>> Animals = Enum('Animals ', 'ant bee cat dog', qualname='SomeData.Animals ')
438+ >>> Animal = Enum('Animal ', 'ant bee cat dog', qualname='SomeData.Animal ')
439439
440440The complete signature is::
441441
@@ -448,6 +448,10 @@ The complete signature is::
448448
449449 'red green blue' | 'red,green,blue' | 'red, green, blue'
450450
451+ or an iterator of names::
452+
453+ ['red', 'green', 'blue']
454+
451455 or an iterator of (name, value) pairs::
452456
453457 [('cyan', 4), ('magenta', 5), ('yellow', 6)]
0 commit comments