[issue44929] Some RegexFlag cannot be printed in the repr

Ethan Furman report at bugs.python.org
Wed Aug 18 14:56:33 EDT 2021


Ethan Furman <ethan at stoneleaf.us> added the comment:

`_name_` is only None if the entire enum value is outside any named member and `_boundary_` is `KEEP` -- so

    class Example(Flag, boundary=KEEP):
        first = auto()
        second = auto()
        third = auto()

    >>> Example(0)
    module.Example(0)

    >>> Example(8)
    module.Example(8)

No need to backport.

----------
versions:  -Python 3.10

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


More information about the Python-bugs-list mailing list