[Python-ideas] constant/enum type in stdlib

Tim Delaney timothy.c.delaney at gmail.com
Mon Feb 11 21:11:35 CET 2013


And I've just realised that my enums will be broken when assigning a
literal containing a name lookup e.g.

v = 1

class MyEnum(Enum):
    A, B
    other_attr = (v,)

other_attr will have an _EnumProxy instance. But I think I can do away with
the _EnumProxy entirely now that I'm using sys._getframe(). Let me try
something.

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


More information about the Python-ideas mailing list