> So is there some libraries like that? I always use a DB-API implementation for the database I use, i.e. psycopg/psycopg2.
Named tuples are really easy to provide: class NamedTuple: def __init__(self, names, values): for name, value in izip(names, values): setattr(self, name, value) person_rows = "first last age".split() def get_person(conn, id): conn.execute("select first, last, age from person where id=%d" % (id,)) return NamedTuple(person_rows, conn.fetchone()) Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list