@@ -508,7 +508,7 @@ evaluate to ``True``.
508
508
Pickling enums created with the functional API can be tricky as frame stack
509
509
implementation details are used to try and figure out which module the
510
510
enumeration is being created in (e.g. it will fail if you use a utility
511
- function in separate module, and also may not work on IronPython or Jython).
511
+ function in a separate module, and also may not work on IronPython or Jython).
512
512
The solution is to specify the module name explicitly as follows::
513
513
514
514
>>> Animal = Enum('Animal', 'ANT BEE CAT DOG', module=__name__)
@@ -540,7 +540,7 @@ The complete signature is::
540
540
541
541
:value: What the new enum class will record as its name.
542
542
543
- :names: The enum members. This can be a whitespace or comma separated string
543
+ :names: The enum members. This can be a whitespace- or comma- separated string
544
544
(values will start at 1 unless otherwise specified)::
545
545
546
546
'RED GREEN BLUE' | 'RED,GREEN,BLUE' | 'RED, GREEN, BLUE'
@@ -997,7 +997,7 @@ Plain :class:`Enum` classes always evaluate as :data:`True`.
997
997
"""""""""""""""""""""""""""""
998
998
999
999
If you give your enum subclass extra methods, like the `Planet `_
1000
- class above , those methods will show up in a :func: `dir ` of the member,
1000
+ class below , those methods will show up in a :func: `dir ` of the member,
1001
1001
but not of the class::
1002
1002
1003
1003
>>> dir(Planet)
@@ -1083,7 +1083,7 @@ the following are true:
1083
1083
>>> Color(0)
1084
1084
Color.BLACK
1085
1085
1086
- - membership / containment checking has changed slightly -- zero valued flags
1086
+ - membership / containment checking has changed slightly -- zero- valued flags
1087
1087
are never considered to be contained::
1088
1088
1089
1089
>>> Color.BLACK in Color.WHITE
@@ -1152,7 +1152,7 @@ that can be used directly, or as examples for creating one's own.
1152
1152
Omitting values
1153
1153
^^^^^^^^^^^^^^^
1154
1154
1155
- In many use-cases one doesn't care what the actual value of an enumeration
1155
+ In many use-cases, one doesn't care what the actual value of an enumeration
1156
1156
is. There are several ways to define this type of simple enumeration:
1157
1157
1158
1158
- use instances of :class: `auto ` for the value
@@ -1338,7 +1338,7 @@ alias::
1338
1338
Planet
1339
1339
^^^^^^
1340
1340
1341
- If :meth: `__new__ ` or :meth: `__init__ ` is defined the value of the enum member
1341
+ If :meth: `__new__ ` or :meth: `__init__ ` is defined, the value of the enum member
1342
1342
will be passed to those methods::
1343
1343
1344
1344
>>> class Planet(Enum):
@@ -1388,8 +1388,9 @@ An example to show the :attr:`_ignore_` attribute in use::
1388
1388
Conforming input to Flag
1389
1389
^^^^^^^^^^^^^^^^^^^^^^^^
1390
1390
1391
- Creating a :class: `Flag ` enum that is more resilient out-of-bounds results to
1392
- mathematical operations, you can use the :attr: `FlagBoundary.CONFORM ` setting::
1391
+ To create a :class: `Flag ` enum that is more resilient to out-of-bounds results
1392
+ from mathematical operations, you can use the :attr: `FlagBoundary.CONFORM `
1393
+ setting::
1393
1394
1394
1395
>>> from enum import Flag, CONFORM, auto
1395
1396
>>> class Weekday(Flag, boundary=CONFORM):
0 commit comments