nodes: 0, module; 1, function_definition; 2, function_name:returnValueList; 3, parameters; 4, block; 5, identifier:self; 6, identifier:key_list; 7, default_parameter; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, if_statement; 12, expression_statement; 13, for_statement; 14, return_statement; 15, identifier:last; 16, False; 17, string:'''Return a list of key values for the first entry in the current list.
          If 'last=True', then the last entry is referenced."
  
          Returns None is the list is empty. If a key is missing, then
          that entry in the list is None.
  
          Example of use:
  
          >>> test = [
          ...    {"name": "Jim",   "age": 18, "income": 93000, "order": 2},
          ...    {"name": "Larry", "age": 18,                  "order": 3},
          ...    {"name": "Joe",   "age": 20, "income": 15000, "order": 1},
          ...    {"name": "Bill",  "age": 19, "income": 29000, "order": 4},
          ... ]
          >>> print PLOD(test).returnValueList(["name", "income"])
          ['Jim', 93000]
          >>> print PLOD(test).sort("name").returnValueList(["name", "income"], last=True)
          ['Larry', None]
  
          :param last:
             If True, the last entry is used rather than the first.
          :return:
             A value, or None if the list is empty.
          '''; 18, assignment; 19, assignment; 20, not_operator; 21, block; 22, assignment; 23, identifier:field; 24, identifier:key_list; 25, block; 26, identifier:result; 27, identifier:result; 28, list; 29, identifier:row; 30, call; 31, identifier:row; 32, return_statement; 33, identifier:dict_row; 34, call; 35, expression_statement; 36, attribute; 37, argument_list; 38, None; 39, attribute; 40, argument_list; 41, call; 42, identifier:self; 43, identifier:returnOneEntry; 44, keyword_argument; 45, identifier:internal; 46, identifier:convert_to_dict; 47, identifier:row; 48, attribute; 49, argument_list; 50, identifier:last; 51, identifier:last; 52, identifier:result; 53, identifier:append; 54, call; 55, attribute; 56, argument_list; 57, identifier:dict_row; 58, identifier:get; 59, identifier:field; 60, None
code: def returnValueList(self, key_list, last=False):
          '''Return a list of key values for the first entry in the current list.
          If 'last=True', then the last entry is referenced."
  
          Returns None is the list is empty. If a key is missing, then
          that entry in the list is None.
  
          Example of use:
  
          >>> test = [
          ...    {"name": "Jim",   "age": 18, "income": 93000, "order": 2},
          ...    {"name": "Larry", "age": 18,                  "order": 3},
          ...    {"name": "Joe",   "age": 20, "income": 15000, "order": 1},
          ...    {"name": "Bill",  "age": 19, "income": 29000, "order": 4},
          ... ]
          >>> print PLOD(test).returnValueList(["name", "income"])
          ['Jim', 93000]
          >>> print PLOD(test).sort("name").returnValueList(["name", "income"], last=True)
          ['Larry', None]
  
          :param last:
             If True, the last entry is used rather than the first.
          :return:
             A value, or None if the list is empty.
          '''
          result = []
          row = self.returnOneEntry(last=last)
          if not row:
              return None
          dict_row = internal.convert_to_dict(row)
          for field in key_list:
              result.append(dict_row.get(field, None))
          return result