Dominic Davis-Foster <dom131...@googlemail.com> added the comment:

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.

----------
nosy: +dom1310df

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41907>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to