David Bear wrote:
> Let's say I have a list called, alist. If I pass alist to a function,
> how can I get the name of it?
> 
> alist = range(10)
> 
> def afunction(list):
>     listName = list.__name__ (fails for a list object)
> 

You don't, see the other reply.

You didn't say why you think you need this for, but I suspect
that you can solve your case by using a dict in one way or another:

{ "somename": [1,2,3,4,5] }


--Irmen
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to