The Database API docs are here http://www.python.org/dev/peps/pep-0249/#description
If I use MySQLdb to do a Table Join in python, then there may be problems,
def query_db(query, args=(), one=False):
cur = db.cursor()
cur.execute(query, args)
rv = [dict((cur.description[idx][0], value)
for idx, value in enumerate(row)) for row in cur.fetchall()]
return (rv[0] if rv else None) if one else rv
result = query_db ('select table1.name, table2.name from table1 inner join table2 on table1.id = table2.id', one=True )
print result
#{'name':'blah blah'}
The finale result will be a dictionary with only one key name, that is because cur.description has no information about table name, only table colum name, so the table2.name overwrites the table1.name.
Is this a bug?