This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients ethan.furman, pablogsal
Date 2021-08-16.22:05:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1629151548.44.0.202618236524.issue44929@roundup.psfhosted.org>
In-reply-to
Content
Same happens when printing a enum.Flag with some values:

>>> enum.Flag(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pablogsal/github/cpython/Lib/enum.py", line 597, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pablogsal/github/cpython/Lib/enum.py", line 944, in __new__
    raise exc
    ^^^^^^^^^
  File "/home/pablogsal/github/cpython/Lib/enum.py", line 921, in __new__
    result = cls._missing_(value)
             ^^^^^^^^^^^^^^^^^^^^
  File "/home/pablogsal/github/cpython/Lib/enum.py", line 1185, in _missing_
    raise ValueError(
    ^^^^^^^^^^^^^^^^^
ValueError: Flag: invalid value: 1
    given 0b0 1
  allowed 0b0 0
History
Date User Action Args
2021-08-16 22:06:15pablogsalunlinkissue44929 messages
2021-08-16 22:05:48pablogsalsetrecipients: + pablogsal, ethan.furman
2021-08-16 22:05:48pablogsalsetmessageid: <1629151548.44.0.202618236524.issue44929@roundup.psfhosted.org>
2021-08-16 22:05:48pablogsallinkissue44929 messages
2021-08-16 22:05:48pablogsalcreate