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 ukl
Recipients docs@python, ukl
Date 2014-06-15.14:07:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402841236.86.0.756808540729.issue21771@psf.upfronthosting.co.za>
In-reply-to
Content
The name of the 2nd parameter to itertools.groupby() is documented inconsitently. Sometimes it's "key", sometimes "keyfunc". The code actually uses "key", so I adapted all occurences I found to "key".

>>> from itertools import groupby
>>> groupby.__doc__
'groupby(iterable[, keyfunc]) -> create an iterator which returns\n(key, sub-iterator) grouped by each value of key(value).\n'

>>> groupby([], keyfunc=lambda x: x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'keyfunc' is an invalid keyword argument for this function

>>> groupby([], key=lambda x: x)
<itertools.groupby object at 0x7fee025d2048>
History
Date User Action Args
2014-06-15 14:07:16uklsetrecipients: + ukl, docs@python
2014-06-15 14:07:16uklsetmessageid: <1402841236.86.0.756808540729.issue21771@psf.upfronthosting.co.za>
2014-06-15 14:07:16ukllinkissue21771 messages
2014-06-15 14:07:16uklcreate