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
This commit is contained in:
Malcolm Tredinnick 2007-06-24 12:38:11 +00:00
parent 02bf47d831
commit a56a8dacf3
1 changed files with 1 additions and 1 deletions

View File

@ -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: