parameters: (args, varargs=None, varkw=None, defaults=None,
                    formatarg=str,
                    formatvarargs=lambda name: '*' + name,
                    formatvarkw=lambda name: '**' + name,
                    formatvalue=lambda value: '=' + repr(value),
                    join=joinseq)
return_statement: return '(' + string.join(specs, ', ') + ')'
docstring: Format an argument spec from the 4 values returned by getargspec.
  
      The first four arguments are (args, varargs, varkw, defaults).  The
      other four arguments are the corresponding optional formatting functions
      that are called to turn names and values into strings.  The ninth
      argument is an optional function to format the sequence of arguments.
docstring_summary: Format an argument spec from the 4 values returned by getargspec.
docstring_tokens: Format an argument spec from the 4 values returned by getargspec .
function: def formatargspec(args, varargs=None, varkw=None, defaults=None,
                    formatarg=str,
                    formatvarargs=lambda name: '*' + name,
                    formatvarkw=lambda name: '**' + name,
                    formatvalue=lambda value: '=' + repr(value),
                    join=joinseq):
      """Format an argument spec from the 4 values returned by getargspec.
  
      The first four arguments are (args, varargs, varkw, defaults).  The
      other four arguments are the corresponding optional formatting functions
      that are called to turn names and values into strings.  The ninth
      argument is an optional function to format the sequence of arguments."""
      specs = []
      if defaults:
          firstdefault = len(args) - len(defaults)
      for i, arg in enumerate(args):
          spec = strseq(arg, formatarg, join)
          if defaults and i >= firstdefault:
              spec = spec + formatvalue(defaults[i - firstdefault])
          specs.append(spec)
      if varargs is not None:
          specs.append(formatvarargs(varargs))
      if varkw is not None:
          specs.append(formatvarkw(varkw))
      return '(' + string.join(specs, ', ') + ')'
function_tokens: def formatargspec ( args , varargs = None , varkw = None , defaults = None , formatarg = str , formatvarargs = lambda name : '*' + name , formatvarkw = lambda name : '**' + name , formatvalue = lambda value : '=' + repr ( value ) , join = joinseq ) : specs = [ ] if defaults : firstdefault = len ( args ) - len ( defaults ) for i , arg in enumerate ( args ) : spec = strseq ( arg , formatarg , join ) if defaults and i >= firstdefault : spec = spec + formatvalue ( defaults [ i - firstdefault ] ) specs . append ( spec ) if varargs is not None : specs . append ( formatvarargs ( varargs ) ) if varkw is not None : specs . append ( formatvarkw ( varkw ) ) return '(' + string . join ( specs , ', ' ) + ')'