This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mdk
Recipients docs@python, greg.solomon, mdk
Date 2016-12-11.20:54:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1481489642.34.0.864343374701.issue28939@psf.upfronthosting.co.za>
In-reply-to
Content
I renamed your function groupby2 to compare it with itertools.groupby and tested but:

>>> print(list(groupby2(['A', 'B'])))

does not returns, looks like your implementation have a bug, so I tried:

>>> for k in groupby2(['A', 'B']):
...     print(k)

and I'm getting loads of:

('A', <generator object groupby2._group at 0x7f0476809f10>)
('A', <generator object groupby2._group at 0x7f0476851f68>)
('A', <generator object groupby2._group at 0x7f0476809f10>)
('A', <generator object groupby2._group at 0x7f0476851f68>)
('A', <generator object groupby2._group at 0x7f0476809f10>)
('A', <generator object groupby2._group at 0x7f0476851f68>)
('A', <generator object groupby2._group at 0x7f0476809f10>)
('A', <generator object groupby2._group at 0x7f0476851f68>)
('A', <generator object groupby2._group at 0x7f0476809f10>)
('A', <generator object groupby2._group at 0x7f0476851f68>)

You may also want to test your implementation against https://github.com/python/cpython/blob/master/Lib/test/test_itertools.py#L699
History
Date User Action Args
2016-12-11 20:54:02mdksetrecipients: + mdk, docs@python, greg.solomon
2016-12-11 20:54:02mdksetmessageid: <1481489642.34.0.864343374701.issue28939@psf.upfronthosting.co.za>
2016-12-11 20:54:02mdklinkissue28939 messages
2016-12-11 20:54:02mdkcreate