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 veky
Recipients barry, eli.bendersky, ethan.furman, ezio.melotti, martin.panter, r.david.murray, serhiy.storchaka, veky
Date 2016-08-14.20:49:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I tried to implement this once. The biggest problem I encountered is  inconsistency with Enum identity: Enum's main idea is that its objects are pre-created and __new__ just return one of them, so equality is simply identity.

If you try to do this with flags, you quickly hit the exponential blowup and with most flags applications, it's utterly impractical to construct all the combinations at the start. So you have MyFlags.a|MyFlags.b is not MyFlags.a|MyFlags.b, and that is very weird and unexpected (especially if MyFlags.a is MyFlags.a, which it is if this case just delegates to Enum.__new__).

How does this patch propose to solve this problem?
Date User Action Args
2016-08-14 20:49:51vekysetrecipients: + veky, barry, ezio.melotti, r.david.murray, eli.bendersky, ethan.furman, martin.panter, serhiy.storchaka
2016-08-14 20:49:51vekysetmessageid: <>
2016-08-14 20:49:51vekylinkissue23591 messages
2016-08-14 20:49:51vekycreate