![](https://secure.gravatar.com/avatar/72ee673975357d43d79069ac1cd6abda.jpg?s=120&d=mm&r=g)
July 28, 2011
7:24 p.m.
ron3200 wrote:
When these objects are passed around, (to/from functions or methods), they will most likely be rebound to more generic names that don't match their string repr anyway.
That doesn't matter, any more than it does for functions and classes. The point is to associate *some* descriptive name with the value for display purposes.
What name would you give...
colors = [] colors.append(Enum(1)) assert str(colors[0]) == ?
Obviously you can't infer any descriptive name from that. Automatic name assignment requires a dedicated syntax, IMO. We just need to wait for the BDFL to find one that he doesn't hate. (Or to stop hating one that he currently hates -- it's happened before...) -- Greg