Nick Coghlan added the comment:

Regarding the key parameter name, I believe this is closer to itertools.groupby 
(which uses "key=" as an optional argument, akin to min, max and sorted) than 
it is to filterfalse, dropwhile or takewhile (which use "pred" as the first 
positional argument)

The only use of "pred" in the optional key argument sense appears to be the 
"quantify" recipe.

+1 for itertools.coalesce, taking the name from SQL. It's designed to serve 
exactly the same purpose as COALESCE does there, doesn't risk confusion with 
next-like behaviour the way "first" does and hints strongly at the fact it is a 
reduction operation from an iterable to a single value.

----------

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

Reply via email to