improve motivation and rationale
This commit is contained in:
parent
f350ee5630
commit
f58b89ccd6
|
@ -24,8 +24,11 @@ intended purpose.
|
||||||
Motivation
|
Motivation
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
The addition of ``StrEnum`` with its requirement to have its ``str()`` be its
|
||||||
|
``value`` is inconsistent with other provided Enum's ``str``.
|
||||||
|
|
||||||
Having the ``str()`` of ``IntEnum`` and ``IntFlag`` not be the value causes
|
Having the ``str()`` of ``IntEnum`` and ``IntFlag`` not be the value causes
|
||||||
bugs and extra work to get the correct behavior.
|
bugs and extra work when replacing existing constants.
|
||||||
|
|
||||||
Having the ``str()`` and ``format()`` of an enum member be different can be
|
Having the ``str()`` and ``format()`` of an enum member be different can be
|
||||||
confusing.
|
confusing.
|
||||||
|
@ -63,7 +66,8 @@ updating.
|
||||||
As much as possible, the ``str()`, ``repr()``, and ``format()`` of enum members
|
As much as possible, the ``str()`, ``repr()``, and ``format()`` of enum members
|
||||||
should be standardized across the stardard library.
|
should be standardized across the stardard library.
|
||||||
|
|
||||||
The repr() of Flag is... not elegant, and can be greatly improved.
|
The repr() of Flag currently includes aliases, which it should not; fixing that
|
||||||
|
will, of course, already change its ``repr()`` in certain cases.
|
||||||
|
|
||||||
|
|
||||||
Specification
|
Specification
|
||||||
|
|
Loading…
Reference in New Issue