From 401b15d853a954c3a7c3c7d43fca0211b2252872 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Thu, 31 Aug 2006 03:45:08 +0000 Subject: [PATCH] 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 --- django/db/backends/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/backends/util.py b/django/db/backends/util.py index 74d33f42ca..88318941c8 100644 --- a/django/db/backends/util.py +++ b/django/db/backends/util.py @@ -98,7 +98,7 @@ def rev_typecast_boolean(obj, d): 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"