def _create_params(parent, argslist_list):
 def check_python2_nested_param(node):
  '\n        Python 2 allows params to look like ``def x(a, (b, c))``, which is\n        basically a way of unpacking tuples in params. Python 3 has ditched\n        this behavior. Jedi currently just ignores those constructs.\n        '
  return ((node.type == 'tfpdef') and (node.children[0] == '('))
 try:
  first = argslist_list[0]
 except IndexError:
  return []
 if (first.type in ('name', 'tfpdef')):
  if check_python2_nested_param(first):
   return [first]
  else:
   return [Param([first], parent)]
 elif (first == '*'):
  return [first]
 else:
  children = first.children
  new_children = []
  start = 0
  for (end, child) in enumerate((children + [None]), 1):
   if ((child is None) or (child == ',')):
    param_children = children[start:end]
    if param_children:
     if check_python2_nested_param(param_children[0]):
      new_children += param_children
     elif ((param_children[0] == '*') and (param_children[1] == ',')):
      new_children += param_children
     else:
      new_children.append(Param(param_children, parent))
     start = end
  return new_children

def _create_params ( parent , argslist_list ) : def check_python2_nested_param ( node ) : return ( ( node . type == 'tfpdef' ) and ( node . children [ 0 ] == '(' ) ) try : first = argslist_list [ 0 ] except IndexError : return [ ] if ( first . type in ( 'name' , 'tfpdef' ) ) : if check_python2_nested_param ( first ) : return [ first ] else : return [ Param ( [ first ] , parent ) ] elif ( first == '*' ) : return [ first ] else : children = first . children new_children = [ ] start = 0 for ( end , child ) in enumerate ( ( children + [ None ] ) , 1 ) : if ( ( child is None ) or ( child == ',' ) ) : param_children = children [ start : end ] if param_children : if check_python2_nested_param ( param_children [ 0 ] ) : new_children += param_children elif ( ( param_children [ 0 ] == '*' ) and ( param_children [ 1 ] == ',' ) ) : new_children += param_children else : new_children . append ( Param ( param_children , parent ) ) start = end return new_children
argslist_list is a list that can contain an argslist as a first item .