You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the regression is due to #58750 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.