From f58b89ccd67eb9f04a2c2cfc918347ec1d89bea1 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Tue, 20 Jul 2021 21:10:30 -0700 Subject: [PATCH] improve motivation and rationale --- pep-0663.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pep-0663.txt b/pep-0663.txt index 6b791009b..b802b38e5 100644 --- a/pep-0663.txt +++ b/pep-0663.txt @@ -24,8 +24,11 @@ intended purpose. 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 -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 confusing. @@ -63,7 +66,8 @@ updating. As much as possible, the ``str()`, ``repr()``, and ``format()`` of enum members 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