Getting actual name of passed arg

Ross Brattain netmgr at canterburycrest.org
Thu Jun 21 18:25:20 EDT 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