diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-24 12:38:11 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-24 12:38:11 +0000 |
| commit | a56a8dacf3b0bc54f6133a2037c2c452152c1653 (patch) | |
| tree | 0b779d58ad629b8dd7579c8f3ef38ef2884bbac3 /django/utils/itercompat.py | |
| parent | 02bf47d831bc73f1a73599582eb2e998fe14f116 (diff) | |
Fixed small bug in Python 2.3 fallback for itertools.groupby. Refs #4506.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/itercompat.py')
| -rw-r--r-- | django/utils/itercompat.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/itercompat.py b/django/utils/itercompat.py index ff814bfd7b..0de1b6cbe2 100644 --- a/django/utils/itercompat.py +++ b/django/utils/itercompat.py @@ -34,7 +34,7 @@ def groupby(iterable, keyfunc=None): keyfunc = lambda x:x iterable = iter(iterable) l = [iterable.next()] - lastkey = keyfunc(l) + lastkey = keyfunc(l[0]) for item in iterable: key = keyfunc(item) if key != lastkey: |
