Ethan Furman <et...@stoneleaf.us> added the comment:
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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44242> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com