[Tutor] Getting at object names

Charlie Clark charlie@begeistert.org
Tue Apr 1 10:39:01 2003


Dear list,

I've started using dispatching via a dictionary which is really nice but I 
came across a problem which I couldn't solve easily and would appreciate 
your help.

imagine this:

friday = []
saturday = []
sunday = []

days = {'1': friday, '2': saturday, '3': sunday}

# the lists are then filled

d = days.keys
d.sort

for day in d:
	print days[day].__name__, days[day],

Now I know the last line doesn't work because __name__ isn't an attriubute 
of the list. But is it possible to get at the name of the list?

Thanx very much

Charlie