Barry A. Warsaw added the comment:

Ethan, the suggestion has come up several times about using a dummy value such 
as the empty tuple to do autonumbering, thus looking more Pythonic.  I'm not a 
huge fan of the empty tuple, and I'm still not sure whether we need this, but I 
wonder if it would be possible to not have a new base class, but to put the 
smarts in the value to which the enums were assigned.  E.g. is this possible (a 
separate question than whether it's good :):

from enum import Enum, auto

class Color(Enum):
    red = auto
    green = auto
    blue = auto

Apologies if this has already been suggested; this tracker thread is too long 
to read the whole thing. :(

----------

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

Reply via email to