def signature(function):
	"""Build a string with source code of the function declaration"""
	desc = inspect.getargspec(function)
	if desc[3]:
		ldefault = len(desc[3])
		default = desc[3]
		sign = ','.join(desc[0][:-ldefault])
	else:
		ldefault = 0
		default=[]
		sign = ','.join(desc[0])	
	for n,v in zip(desc[0][-ldefault:],default):
		sign += ','+n+"="+str(v)	
	if desc[1]:
		sign +=',*'+desc[1]
	if desc[2]:
		sign +=',**'+desc[2]	
	if sign and sign[0]==',': sign = sign[1:]
	return sign
Build a string with source code of the function declaration
recipes/Python/81790_Using_introspectiverify_Eiffel_like/recipe-81790.py