[issue18652] Add a “first” function to the stdlib
Martin v. Löwis
report at bugs.python.org
Sun Aug 4 13:38:39 CEST 2013
Martin v. Löwis added the comment:
I also think it should go to itertools.
I also found the name "first" confusing, in particular since it means what Serhiy assumes in LISP, which might be familiar to people interested in functional list processing. Also, Ruby and Smalltalk use "first" in that sense.
To add to the bike shedding, I propose "find_if" (from LISP), "coalesce" (from SQL), or "detect" (from Smalltalk).
-1 on calling the filter function "key=". How about "pred=" (like all other itertools predicates) or "filter="?
----------
nosy: +loewis
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18652>
_______________________________________
More information about the Python-bugs-list
mailing list