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:
parent
02bf47d831
commit
a56a8dacf3
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue