Josh Rosenberg added the comment:

While you're fixing, the docstring should say "groupby(iterable, key=None)", 
not "groupby(iterable[, keyfunc])"; the functions accepts the key function by 
name, and the name is key, not keyfunc. And it can be passed explicitly as None 
(equivalent to not passing it at all), so the [, keyfunc] approach that 
indicates it's positional only and can't be explicitly passed as a default is 
wrong. Gets a little confusing because it also returns a "key", but the 
argument is definitely named "key", so we can't go calling it "keyfunc".

Mind you, seems like this could also be fixed by just Clinic-ifying it.

----------
nosy: +josh.r

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27385>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to