Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.2.X] Fixed #15283 -- Made a minor performance tweak to __iter__. T…

…hanks to lanyjie for the report.

Backport of r15491 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f8ff9fee2bfa88f70b388e99e79fca2103f6c1db 1 parent 54987dd
Russell Keith-Magee authored February 12, 2011

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

  1. 2  django/db/models/query.py
2  django/db/models/query.py
@@ -79,7 +79,7 @@ def __len__(self):
79 79
             else:
80 80
                 self._result_cache = list(self.iterator())
81 81
         elif self._iter:
82  
-            self._result_cache.extend(list(self._iter))
  82
+            self._result_cache.extend(self._iter)
83 83
         return len(self._result_cache)
84 84
 
85 85
     def __iter__(self):

0 notes on commit f8ff9fe

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