On 5/19/2013 9:08 PM, Ethan Furman wrote:
On 05/19/2013 05:24 PM, Nick Coghlan wrote:

This is the point I was trying to make: once you use IntEnum (as you
would in any case where you need bitwise operators), Enum gets out of
the way for everything other than __str__, __repr__, and one other
slot (that escapes me for the moment...).

__getnewargs__ and __new__

But if you do math, the result is no longer an Enum of any type.

And thus completely loses the debugging benefits of having a nice __repr__. IntEnum isn't useful for bitfields.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to