Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…nt. Thanks for the patch, Andy Dustman

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 401b15d853a954c3a7c3c7d43fca0211b2252872 1 parent fe5462e
Adrian Holovaty authored August 31, 2006

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/db/backends/util.py
2  django/db/backends/util.py
@@ -98,7 +98,7 @@ def rev_typecast_boolean(obj, d):
98 98
 
99 99
 def _dict_helper(desc, row):
100 100
     "Returns a dictionary for the given cursor.description and result row."
101  
-    return dict([(desc[col[0]][0], col[1]) for col in enumerate(row)])
  101
+    return dict(zip([col[0] for col in desc], row))
102 102
 
103 103
 def dictfetchone(cursor):
104 104
     "Returns a row from the cursor as a dict"

0 notes on commit 401b15d

Please sign in to comment.
Something went wrong with that request. Please try again.