This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barry
Recipients barry, ethan.furman, ncoghlan, pitrou
Date 2013-05-13.15:09:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20130513110927.20cbead5@anarchist>
In-reply-to <1172298768.36174760.1368453982354.JavaMail.root@zimbra10-e2.priv.proxad.net>
Content
On May 13, 2013, at 02:06 PM, Antoine Pitrou wrote:

>Antoine Pitrou added the comment:
>
>> >I agree with Nick here, there's no reason to auto-number constants
>> >in
>> >Python. This is not C :-)
>> 
>> Why should they be strings?   Why not object()?
>
>Because strings are readable, I'd say.

The repr would then be

<Color.red: Color.red>

Yuck.

Also, you would have to allow for subclasses (e.g. IntEnum) to override
auto-assignment.  Clearly, you can't use strings for

X = IntEnum('X', 'start middle end')
History
Date User Action Args
2013-05-13 15:09:31barrysetrecipients: + barry, ncoghlan, pitrou, ethan.furman
2013-05-13 15:09:31barrylinkissue17961 messages
2013-05-13 15:09:31barrycreate