Author: adrian
Date: 2006-08-30 22:45:08 -0500 (Wed, 30 Aug 2006)
New Revision: 3684

Modified:
   django/trunk/django/db/backends/util.py
Log:
Fixed #2632 -- Made django.db.backends.util._dict_helper more efficient. Thanks 
for the patch, Andy Dustman

Modified: django/trunk/django/db/backends/util.py
===================================================================
--- django/trunk/django/db/backends/util.py     2006-08-31 03:16:08 UTC (rev 
3683)
+++ django/trunk/django/db/backends/util.py     2006-08-31 03:45:08 UTC (rev 
3684)
@@ -98,7 +98,7 @@
 
 def _dict_helper(desc, 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):
     "Returns a row from the cursor as a dict"


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to