This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dom1310df
Recipients barry, dom1310df, eli.bendersky, eric.smith, ethan.furman, rt121212121
Date 2020-10-02.08:46:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I believe the regression is due to GH-14545 which "fixed" bpo-37479. The news entry states:

"When `Enum.__str__` is overridden in a derived class, the override will be used by `Enum.__format__` regardless of whether mixin classes are present."


The change is in the __format__ method of Enum. It now checks if type(self).__str__ != Enum.__str__ and if True calls str(self). Because Flag defines its own __str__ method, the expression evaluates to True. I do not think this is the indented behaviour.

In 3.8.5 str(self) was only called if _member_type_ is object.
Date User Action Args
2020-10-02 08:46:48dom1310dfsetrecipients: + dom1310df, barry, eric.smith, eli.bendersky, ethan.furman, rt121212121
2020-10-02 08:46:48dom1310dfsetmessageid: <>
2020-10-02 08:46:48dom1310dflinkissue41907 messages
2020-10-02 08:46:48dom1310dfcreate