This just doesn't make sense to me:

--> class Stuff(Enum):
...     blue = 1
...     china = 'really big country'
...     random = (8273.199, 517)

--> Stuff.blue.name == 'blue'
--> Stuff.blue.value == 1

--> Stuff.china.name == 'china'
--> Stuff.china.value == ???

--> Stuff.random.name == 'random'
--> Stuff.china.value == ???

In order to make this work at all, we have to support auto-numbering, and I didn't think we were going to do that in the class syntax?

--
~Ethan~

P.S. Apologies for all the questions, I'm just hoping to get the last details hammered out so we can stop discussing Enums. ;)
_______________________________________________
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