On Mon, Apr 29, 2013 at 2:45 PM, Terry Jan Reedy <tjre...@udel.edu> wrote: > On 4/29/2013 8:24 AM, Eli Bendersky wrote: > >> Thanks for the summary. One issue I don't see addressed here is >> int-compatibility. Am I correct to assume that nothing changes w.r.t. >> that, and that an IntEnum subclass of Enum will be provided which is >> isinstance(integer)? Does that become straightforward by nature of enum >> values being the type of their enumerations? > > > My only concern is that whatever you do does not break transitivity of ==. > Aside from that, I will be happy with whatever you end up with and use it as > appropriate.
This is a trick question though, isn't it? Example: class Color(Enum): red = 1 white = 2 blue = 3 class State(Enum): idle = 0 busy = 1 We would have State.busy == 1 and Color.red == 1, so now State.busy == Color.red. -- --Guido van Rossum (python.org/~guido) _______________________________________________ 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