Message377804
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:48 | dom1310df | set | recipients:
+ dom1310df, barry, eric.smith, eli.bendersky, ethan.furman, rt121212121 |
2020-10-02 08:46:48 | dom1310df | set | messageid: <1601628408.68.0.607597676952.issue41907@roundup.psfhosted.org> |
2020-10-02 08:46:48 | dom1310df | link | issue41907 messages |
2020-10-02 08:46:48 | dom1310df | create | |
|