Message273040
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. :( |
|
Date |
User |
Action |
Args |
2016-08-18 15:33:47 | barry | set | recipients:
+ barry, rhettinger, vstinner, eli.bendersky, ethan.furman, python-dev, abarry, John Hagen, David Hagen |
2016-08-18 15:33:47 | barry | set | messageid: <1471534427.84.0.121911431381.issue26988@psf.upfronthosting.co.za> |
2016-08-18 15:33:47 | barry | link | issue26988 messages |
2016-08-18 15:33:47 | barry | create | |
|