[issue44242] enum.IntFlag regression: missing values cause TypeError
John Belmonte
report at bugs.python.org
Wed May 26 18:21:12 EDT 2021
John Belmonte <john at neggie.net> added the comment:
> Do you agree that simply removing the unnamed member check that takes place at Flag creation is a good way forward?
It's uncomfortable, because then STRICT is not actually strict, and it's going to be show raw values in str/repr.
> CONFORM -> unnamed bits are discarded (so the DEFAULT flag would be returned)
This behavior of CONFORM is a little dubious. I expect it to conform new values after the class is constructed. But the class members themselves should not have that transform applied, and raise an error on invalid bits.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44242>
_______________________________________
More information about the Python-bugs-list
mailing list