reword complicated sentence
This commit is contained in:
parent
143f7cf398
commit
286c812369
|
@ -372,10 +372,10 @@ However they still can't be compared to ``Enum``::
|
|||
>>> [i for i in range(Shape.square)]
|
||||
[0, 1]
|
||||
|
||||
For the vast majority of code, ``Enum`` is strongly recommended.
|
||||
Since ``IntEnum`` breaks some semantic promises of an enumeration (by
|
||||
For the vast majority of code, ``Enum`` is strongly recommended,
|
||||
since ``IntEnum`` breaks some semantic promises of an enumeration (by
|
||||
being comparable to integers, and thus by transitivity to other
|
||||
unrelated enumerations), it should be used only in special cases where
|
||||
unrelated enumerations). It should be used only in special cases where
|
||||
there's no other choice; for example, when integer constants are
|
||||
replaced with enumerations and backwards compatibility is required
|
||||
with code that still expects integers.
|
||||
|
|
Loading…
Reference in New Issue