[New-bugs-announce] [issue13299] namedtuple row factory for sqlite3

Nick Coghlan report at bugs.python.org
Mon Oct 31 01:32:25 CET 2011

New submission from Nick Coghlan <ncoghlan at gmail.com>:

Currently, sqlite3 allows rows to be easily returned as ordinary tuples (default) or sqlite3.Row objects (which allow dict-style access).

collections.namedtuple provides a much nicer interface than sqlite3.Row for accessing ordered data which uses valid Python identifiers for field names, and can also tolerate field names which are *not* valid identifiers.

It would be convenient if sqlite3 provided a row factory along the lines of the one posted here:

(except with smarter caching on the named tuples)

messages: 146670
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: namedtuple row factory for sqlite3
type: feature request
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list