Skip to content

Commit

Permalink
Fixed small bug in Python 2.3 fallback for itertools.groupby. Refs #4506
Browse files Browse the repository at this point in the history
.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Jun 24, 2007
1 parent 02bf47d commit a56a8da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/utils/itercompat.py
Expand Up @@ -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:
Expand Down

0 comments on commit a56a8da

Please sign in to comment.