def _getParameter(name, index, args, kwargs, default=None):
 param = kwargs.get(name)
 if (len(args) > index):
  if param:
   raise TypeError(("Parameter '%s' is specified twice" % name))
  param = args[index]
 return (param or default)

def _getParameter ( name , index , args , kwargs , default = None ) : param = kwargs . get ( name ) if ( len ( args ) > index ) : if param : raise TypeError ( ( "Parameter '%s' is specified twice" % name ) ) param = args [ index ] return ( param or default )
find a parameter in tuple and dictionary arguments a function receives .