New to Python: Do we have the concept of Hash in Python?
Jeffrey Froman
jeffrey at fro.man
Thu Jun 1 11:34:35 EDT 2006
A.M wrote:
> I am asking this because I learned that DB-API in Python doesn't offer
> access to cursor columns by name. The only option is access by index. I
> hope that I've got it wrong!
While it's not part of the DB-API as far as I know, the MySQLdb package (and
perhaps other DB access modules as well, I don't know) provides
a "DictCursor" class that returns query results as a tuple of column-keyed
dictionaries (hashes, already demonstrated by Brian).
Jeffrey
More information about the Python-list
mailing list