[New-bugs-announce] [issue41786] re.RegexFlag.__str__ is incorrect

Ethan Furman report at bugs.python.org
Mon Sep 14 18:05:08 EDT 2020


New submission from Ethan Furman <ethan at stoneleaf.us>:

In issue36548 - Make the repr of re flags more readable - __str__ is set to object.__str__.  Hovewer, setting __str__ to object.__str__ means that EnumMeta will replace __str__ with the first Enum's __str__ instead (Flag, in this case).

As asked in issue40066: do we want the str() and repr() to be the same, or should the str() be the plain numeric value?

----------
components: Library (Lib)
messages: 376911
nosy: ethan.furman, ezio.melotti, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: re.RegexFlag.__str__ is incorrect
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41786>
_______________________________________


More information about the New-bugs-announce mailing list