11 Feb
2013
11 Feb
'13
12:22 p.m.
On 12 February 2013 07:11, Tim Delaney
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.
Too early in the morning. The above would avoid the whole _EnumProxy because 'v' would be successfully looked up in the global namespace. But I may still get rid of some instances of _EnumProxy. Tim Delaney