[issue18652] Add itertools.coalesce

Tim Peters report at bugs.python.org
Mon Aug 5 01:46:34 CEST 2013


Tim Peters added the comment:

> skipping the underscore ("firsttrue" or "nexttrue")
> would arguably be more consistent with other itertools names.

Like izip_longest and combinations_with_replacement? ;-)

I care about readability here more than consistency with the bulk of itertools names.  "first" ends with "t" and "true" begins with "t", which makes "firsttrue" an eyesore.  "first_true" strikes me as very easy to read, spell, remember and understand.

Offhand I don't know what "nexttrue" is supposed to mean (like "if that's supposed to mean the first true iterate, why didn't they say 'first' instead of 'next'?").

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18652>
_______________________________________


More information about the Python-bugs-list mailing list