Hi!
I was wondering what can I do to print the name of a list that is
inside a list. For example:
exported = ['123','456']
imported = ['789','012']
client1 = ['cl1b','cl1a']
client2 = ['cl2a','cl2b']
host = ['imported','exported']
client = ['client1','client2']
list = ['host', 'client']
My
In general, no --- there is no unique mapping between references and
names.
For debugging, however, it is sometimes useful to try this kind of
reverse lookup by iterating over the global dictionary:
def guess_name(thing):
for name, reference in globals.iteritems():
if thing is
[EMAIL PROTECTED] wrote:
Hi!
I was wondering what can I do to print the name of a list that is
inside a list. For example:
exported = ['123','456']
imported = ['789','012']
client1 = ['cl1b','cl1a']
client2 = ['cl2a','cl2b']
host = ['imported','exported']
client =
Wow, thanks.that's a neat little functionI'll still check out
the dictionary stuff. For now, this helps a lot though...
THANKS!!!
--
http://mail.python.org/mailman/listinfo/python-list