0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed #15283 -- Made a minor performance tweak to __iter__. Thanks to lanyjie for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15491 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2011-02-12 05:23:41 +00:00
parent b01cc1bd89
commit 337a6bc0f6

View File

@ -81,7 +81,7 @@ class QuerySet(object):
else:
self._result_cache = list(self.iterator())
elif self._iter:
self._result_cache.extend(list(self._iter))
self._result_cache.extend(self._iter)
return len(self._result_cache)
def __iter__(self):