def getdict(results, description):
  """Returns a list of ResultRow objects based upon already retrieved results 
     and the query description returned from cursor.description"""
 
  # get the field names
  fields = {}
  for i in range(len(description)):
    fields[description[i][0]] = i

  # generate the list of ResultRow objects
  rows = []
  for result in results:
    rows.append(ResultRow(result, fields))

  # return to the user
  return rows
Returns a list of ResultRow objects based upon already retrieved results 
     and the query description returned from cursor.description
recipes/Python/163605_resultsetpy/recipe-163605.py