def _get_arg_list(name, fobj):
 trunc = 20
 argspec = inspect.getargspec(fobj)
 arg_list = []
 if argspec.args:
  for arg in argspec.args:
   arg_list.append(str(arg))
 arg_list.reverse()
 if argspec.defaults:
  for i in range(len(argspec.defaults)):
   arg_list[i] = ((str(arg_list[i]) + '=') + str(argspec.defaults[(- i)]))
 arg_list.reverse()
 if argspec.varargs:
  arg_list.append(argspec.varargs)
 if argspec.keywords:
  arg_list.append(argspec.keywords)
 arg_list = [x[:trunc] for x in arg_list]
 str_param = ('%s(%s)' % (name, ', '.join(arg_list)))
 return str_param

def _get_arg_list ( name , fobj ) : trunc = 20 argspec = inspect . getargspec ( fobj ) arg_list = [ ] if argspec . args : for arg in argspec . args : arg_list . append ( str ( arg ) ) arg_list . reverse ( ) if argspec . defaults : for i in range ( len ( argspec . defaults ) ) : arg_list [ i ] = ( ( str ( arg_list [ i ] ) + '=' ) + str ( argspec . defaults [ ( - i ) ] ) ) arg_list . reverse ( ) if argspec . varargs : arg_list . append ( argspec . varargs ) if argspec . keywords : arg_list . append ( argspec . keywords ) arg_list = [ x [ : trunc ] for x in arg_list ] str_param = ( '%s(%s)' % ( name , ', ' . join ( arg_list ) ) ) return str_param
given a function object .