Skip to content

Commit 0893140

Browse files
committed
Merge pull request pallets#817 from llimllib/master
Fix doc bug in patterns/sqlite3, clarify use of make_dicts
2 parents 2e17ad7 + 159ae3d commit 0893140

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/patterns/sqlite3.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ Now in each request handling function you can access `g.db` to get the
7272
current open database connection. To simplify working with SQLite, a
7373
row factory function is useful. It is executed for every result returned
7474
from the database to convert the result. For instance in order to get
75-
dictionaries instead of tuples this can be used::
75+
dictionaries instead of tuples this could be inserted into ``get_db``::
7676

7777
def make_dicts(cursor, row):
78-
return dict((cur.description[idx][0], value)
78+
return dict((cursor.description[idx][0], value)
7979
for idx, value in enumerate(row))
8080

8181
db.row_factory = make_dicts

0 commit comments

Comments
 (0)