On Sun, May 5, 2013 at 4:15 PM, Ethan Furman <et...@stoneleaf.us> wrote:
> On 05/05/2013 03:16 PM, Nikolaus Rath wrote:
>>
>> Guido van Rossum <gu...@python.org> writes:
>>>>
>>>> 1. Having to enter the values is annoying. Sorry, I read the rationale
>>>> and
>>>> all that, and I *still* want to write a C-Like enum { A, B, C }. I fully
>>>> expect to edit and reorder enums (if I ever use them) and get irritated
>>>> with
>>>> having to update the value assignments.
>>>
>>>
>>> I guess there are cultural differences around this. Anyway, you can
>>> use the functional/convenience API for this purpose.
>>
>>
>> Would it be wise to forbid ... as an enum value to preserve the option
>> to use it for automatic value assignment in some indefinite future?
>
>
> No.  If somebody has a use for ... is a value we're not going to say no on
> the very remote chance that Guido someday changes his mind on that point.
> ;)

Correct. *If* we were to have a change of heart on this issue, we'd
just introduce a class AutoNumberEnum. But I find the "..." syntax
sufficiently ugly that I really don't expect I'll ever change my mind.

-- 
--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

Reply via email to