Getting actual name of passed arg

Ross Brattain netmgr at canterburycrest.org
Fri Jun 22 00:25:20 CEST 2001


Just found it

import inspect

def bar(a):
	print inspect.getargvalues(inspect.currentframe())[-1]

bar(1)  should print out {'a' : 1}


Ross Brattain
netmgr at canterburycrest.org





More information about the Python-list mailing list