def funcinfo(function):
 warnings.warn('[v2.5] Use inspect.getargspec instead of twisted.python.reflect.funcinfo', DeprecationWarning, stacklevel=2)
 code = function.func_code
 name = function.func_name
 argc = code.co_argcount
 argv = code.co_varnames[:argc]
 defaults = function.func_defaults
 out = []
 out.append(('The function %s accepts %s arguments' % (name, argc)))
 if defaults:
  required = (argc - len(defaults))
  out.append(('It requires %s arguments' % required))
  out.append(('The arguments required are: %s' % argv[:required]))
  out.append('additional arguments are:')
  for i in range((argc - required)):
   j = (i + required)
   out.append(('%s which has a default of' % (argv[j], defaults[i])))
 return out

def funcinfo ( function ) : warnings . warn ( '[v2.5] Use inspect.getargspec instead of twisted.python.reflect.funcinfo' , DeprecationWarning , stacklevel = 2 ) code = function . func_code name = function . func_name argc = code . co_argcount argv = code . co_varnames [ : argc ] defaults = function . func_defaults out = [ ] out . append ( ( 'The function %s accepts %s arguments' % ( name , argc ) ) ) if defaults : required = ( argc - len ( defaults ) ) out . append ( ( 'It requires %s arguments' % required ) ) out . append ( ( 'The arguments required are: %s' % argv [ : required ] ) ) out . append ( 'additional arguments are:' ) for i in range ( ( argc - required ) ) : j = ( i + required ) out . append ( ( '%s which has a default of' % ( argv [ j ] , defaults [ i ] ) ) ) return out
this is more documentation for myself than useful code .