[Python-ideas] constant/enum type in stdlib

Tim Delaney timothy.c.delaney at gmail.com
Fri Feb 1 12:41:58 CET 2013


On 1 February 2013 20:27, Serhiy Storchaka <storchaka at gmail.com> wrote:

> I think that instead of the invention of implementation which covers all
> possible hypothetic scenarios


The scenarios I'm really interested in here is DRY; automatic assignment
(i.e. not having to specify any values); manual assignment (which should
allow any expression that is legal within a class definition) and being
able to introspect the enum.

Everything else falls out of supporting those scenarios within the normal
restrictions of enums (in particular 1:1 mapping) and conforming to obvious
interfaces.

Tim Delaney
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130201/7ac0eaf6/attachment.html>


More information about the Python-ideas mailing list