[issue44929] Some RegexFlag cannot be printed in the repr

Pablo Galindo Salgado report at bugs.python.org
Mon Aug 16 18:09:21 EDT 2021


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Simpler reproducer:

>>> import re
>>> re.RegexFlag(0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pablogsal/github/cpython/Lib/enum.py", line 1399, in global_flag_repr
    return "%x" % (module, cls_name, self._value_)
           ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TypeError: %x format: an integer is required, not str

----------

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


More information about the Python-bugs-list mailing list