[issue13299] namedtuple row factory for sqlite3

Daniel Lenski report at bugs.python.org
Mon Aug 4 11:28:05 CEST 2014


Daniel Lenski added the comment:

Serhiy,
52 usec/loop doesn't seem like much overhead. This is not 52 usec per row fetched, but just 52 usec per cursor.execute(). An example where >1 row is fetched for each cursor would show this more clearly.

The advantage of namedtuple is that it's a very well-known interface to most Python programmers. Other db-api modules have taken a similar approach; psycopg2 has a dict-like cursor similar to Row, but has added NameTupleCursor in recent versions. (http://initd.org/psycopg/docs/extras.html#namedtuple-cursor)

----------
nosy: +dlenski

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13299>
_______________________________________


More information about the Python-bugs-list mailing list