code: def row_to_obj(self, row, cur):
          
          obj = tornado.util.ObjectDict()
          for val, desc in zip(row, cur.description):
              obj[desc.name] = val
          return obj
docs: Convert a SQL row to an object supporting dict and attribute access.