Vedran Čačić added the comment:

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?

----------
nosy: +veky

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23591>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to