def _arguments( self, value ):
		if self._useCall( value ):
			value = value.__call__
		if hasattr(value, 'im_func'):
			# receiver is a method. Drop the first argument, usually 'self'.
			func = value.im_func
			arguments = inspect.getargspec( func )
			if value.im_self is not None:
				# a bound instance or class method
				arguments = inspect.getargspec( func )
				del arguments[0][0]
			else:
				# an un-bound method
				pass
		elif hasattr(value, 'func_code') or hasattr(value, 'im_code'):
			# receiver is a function.
			func = value
			arguments = inspect.getargspec( func )
		else:
			raise ValueError('unknown reciever type %s %s'%(receiver, type(receiver)))
		names, vararg, varnamed, defaults = arguments
		defaults = defaults or ()
		result = [ Argument( name = name ) for name in names ]
		for name,default in zip( names[-len(defaults):],defaults):
			for item in result:
				if item.name == name:
					item.default = default
		return result
Get a list of arguments for a callable object
dataset/ETHPy150Open correl/Transmission-XBMC/resources/lib/basictypes/callable.py/Callable._arguments