Mapping result rows to namedtuple in python sqlite
问题 I am playing a bit with the python api for sqlite3, i have a little table for store languages with an id, name and creation_date fields. I am trying to map the raw query results into a namedtuple as the docs recommend, it that way i can manage rows in a more readable way, so here is my namedtuple . LanguageRecord = namedtuple('LanguageRecord', 'id, name, creation_date') The code that the docs suggest for the mapping is as follows: for language in map(LanguageRecord._make, c.fetchall()): # do