Python's sad, unimaginative Enum
Chris Angelico
rosuav at gmail.com
Mon May 13 13:36:34 EDT 2013
On Mon, May 13, 2013 at 8:17 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> Let's look at his major criticisms:
>
> 1) values aren't automatically generated.
>
> True. So what? That is the *least* important part of enums.
I stopped following the -ideas threads about enums, but IIRC
autogeneration of values was in quite a few of the specs early on. So
you can probably find the arguments against it in the list archives.
FWIW, though, I do like C's autogeneration of enum values - but use it
in only a small proportion of my enums. It's not a terrible loss, but
it is a loss.
ChrisA
More information about the Python-list
mailing list