parameters: (self)
return_statement: return iter(common.PushBackIterator(iterate()))
docstring: Yields a key/value pair, the key is None, if its not a named arg.
docstring_summary: Yields a key/value pair, the key is None, if its not a named arg.
docstring_tokens: Yields a key / value pair the key is None if its not a named arg .
function: def get_var_args_iterator(self):
          """
          Yields a key/value pair, the key is None, if its not a named arg.
          """
          def iterate():
              # `var_args` is typically an Array, and not a list.
              for stmt in self.var_args:
                  if not isinstance(stmt, pr.Statement):
                      if stmt is None:
                          yield None, None
                          continue
                      old = stmt
                      # generate a statement if it's not already one.
                      module = builtin.Builtin.scope
                      stmt = pr.Statement(module, [], (0, 0), None)
                      stmt._commands = [old]
  
                  # *args
                  commands = stmt.get_commands()
                  if not len(commands):
                      continue
                  if commands[0] == '*':
                      arrays = evaluate.follow_call_list(commands[1:])
                      # *args must be some sort of an array, otherwise -> ignore
  
                      for array in arrays:
                          if isinstance(array, Array):
                              for field_stmt in array:  # yield from plz!
                                  yield None, field_stmt
                          elif isinstance(array, Generator):
                              for field_stmt in array.iter_content():
                                  yield None, helpers.FakeStatement(field_stmt)
                  # **kwargs
                  elif commands[0] == '**':
                      arrays = evaluate.follow_call_list(commands[1:])
                      for array in arrays:
                          if isinstance(array, Array):
                              for key_stmt, value_stmt in array.items():
                                  # first index, is the key if syntactically correct
                                  call = key_stmt.get_commands()[0]
                                  if isinstance(call, pr.Name):
                                      yield call, value_stmt
                                  elif isinstance(call, pr.Call):
                                      yield call.name, value_stmt
                  # Normal arguments (including key arguments).
                  else:
                      if stmt.assignment_details:
                          key_arr, op = stmt.assignment_details[0]
                          # named parameter
                          if key_arr and isinstance(key_arr[0], pr.Call):
                              yield key_arr[0].name, stmt
                      else:
                          yield None, stmt
  
          return iter(common.PushBackIterator(iterate()))
function_tokens: def get_var_args_iterator ( self ) : def iterate ( ) : # `var_args` is typically an Array, and not a list. for stmt in self . var_args : if not isinstance ( stmt , pr . Statement ) : if stmt is None : yield None , None continue old = stmt # generate a statement if it's not already one. module = builtin . Builtin . scope stmt = pr . Statement ( module , [ ] , ( 0 , 0 ) , None ) stmt . _commands = [ old ] # *args commands = stmt . get_commands ( ) if not len ( commands ) : continue if commands [ 0 ] == '*' : arrays = evaluate . follow_call_list ( commands [ 1 : ] ) # *args must be some sort of an array, otherwise -> ignore for array in arrays : if isinstance ( array , Array ) : for field_stmt in array : # yield from plz! yield None , field_stmt elif isinstance ( array , Generator ) : for field_stmt in array . iter_content ( ) : yield None , helpers . FakeStatement ( field_stmt ) # **kwargs elif commands [ 0 ] == '**' : arrays = evaluate . follow_call_list ( commands [ 1 : ] ) for array in arrays : if isinstance ( array , Array ) : for key_stmt , value_stmt in array . items ( ) : # first index, is the key if syntactically correct call = key_stmt . get_commands ( ) [ 0 ] if isinstance ( call , pr . Name ) : yield call , value_stmt elif isinstance ( call , pr . Call ) : yield call . name , value_stmt # Normal arguments (including key arguments). else : if stmt . assignment_details : key_arr , op = stmt . assignment_details [ 0 ] # named parameter if key_arr and isinstance ( key_arr [ 0 ] , pr . Call ) : yield key_arr [ 0 ] . name , stmt else : yield None , stmt return iter ( common . PushBackIterator ( iterate ( ) ) )