Kaydet (Commit) 401b15d8 authored tarafından Adrian Holovaty's avatar Adrian Holovaty

Fixed #2632 -- Made django.db.backends.util._dict_helper more efficient. Thanks…

Fixed #2632 -- Made django.db.backends.util._dict_helper more efficient. Thanks for the patch, Andy Dustman

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst fe5462e5
...@@ -98,7 +98,7 @@ def rev_typecast_boolean(obj, d): ...@@ -98,7 +98,7 @@ def rev_typecast_boolean(obj, d):
def _dict_helper(desc, row): def _dict_helper(desc, row):
"Returns a dictionary for the given cursor.description and result row." "Returns a dictionary for the given cursor.description and result row."
return dict([(desc[col[0]][0], col[1]) for col in enumerate(row)]) return dict(zip([col[0] for col in desc], row))
def dictfetchone(cursor): def dictfetchone(cursor):
"Returns a row from the cursor as a dict" "Returns a row from the cursor as a dict"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment