Andy Terrel wrote: > Why bang your head? Because there's no chance that the original request is sane.
If you want your objects to know their name, give them a name as an attribute. > It was a stupid hack that has lots of problems, > but done in a way that is readable. Sure I could do something more > functional or one lined like: > > Banana={} > names = filter(lambda x:id(eval(x))==id(Banana),dir()) > > but I am guessing that it is harder to read by many. Anywho I can > think of plenty of reasons it would fail, but it really depends on the > app. Georg -- http://mail.python.org/mailman/listinfo/python-list