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 ethan.furman
Recipients John Belmonte, Manjusaka, ethan.furman, hauntsaninja, hroncok, jbelmonte, pablogsal, veky
Date 2021-05-26.21:35:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1622064905.26.0.770002072957.issue44242@roundup.psfhosted.org>
In-reply-to
Content
Actually, thinking about that a little bit more, KEEP was added for exactly this situation, as some stdlib flags exhibit the same behavior.

So the real question is what should happen with, for example,

  GeodIntermediateFlag(0x80)

?

The idea behind boundary is what should happen when values are created that don't have names in the Enum/Flag?  The options for boundary are:

STRICT  -> an error is raised  (default for Enum)
EJECT   -> the integer 0x80 is returned (not a flag)
CONFORM -> unnamed bits are discarded (so the DEFAULT flag would be returned)
KEEP    -> an unnamed flag with value 0x80 is returned

So KEEP is currently doing double-duty -- this reinforces my desire to go with option 2 and return KEEP to single-duty status.
History
Date User Action Args
2021-05-26 21:35:05ethan.furmansetrecipients: + ethan.furman, jbelmonte, veky, hroncok, pablogsal, Manjusaka, John Belmonte, hauntsaninja
2021-05-26 21:35:05ethan.furmansetmessageid: <1622064905.26.0.770002072957.issue44242@roundup.psfhosted.org>
2021-05-26 21:35:05ethan.furmanlinkissue44242 messages
2021-05-26 21:35:05ethan.furmancreate