This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Please make sqlite3.Row iterable
Type: Stage:
Components: Extension Modules Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ghaering Nosy List: ghaering, nnorwitz, philipdumont
Priority: normal Keywords:

Created on 2007-05-17 20:23 by philipdumont, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sqlite.py philipdumont, 2007-05-17 20:23 Failure when trying to iterate over a row
Messages (3)
msg32034 - (view) Author: phil (philipdumont) Date: 2007-05-17 20:23
Sometimes I'd like to get row values with columnname
indexes, sometimes by iterating over the row.

The default (not setting the connection's row_factory)
is to return a tuple, which gives the latter, but not
the former.

Setting row_factory to sqlite3.Row gives the former,
but (surprisingly) not the latter.

It's a surprise because back when pysqlite was not part
of the Python distrib (I don't recall what version), its
Row type was iterable.  Any chance that bit of
functionality could be put back?
msg32035 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-05-17 21:14
Gerhard, could you take a look?
msg32036 - (view) Author: Gerhard Häring (ghaering) * (Python committer) Date: 2007-05-20 16:26
This functionality is already in the Python 2.6 branch. I was told not to backport it to 2.5.x. So, I'll close this issue.
History
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 44966
2007-05-17 20:23:56philipdumontcreate