Getting the argument names passed to a function ?

Andreas Jung ajung at sz-sb.de
Tue Apr 4 22:58:10 CEST 2000


def myfunc(arg1,arg2):
	...


a=1;b=2
myfunc(a,b)

Is it possible to get the name of variables that  were
used as arguments to call myfunc(). myfunc() should be
able to determine the names 'a' and 'b'. Don't ask
me why I need this - it's for a worse Python hack :-)

Cheers,
Andreas





More information about the Python-list mailing list