
Dec. 13, 2019
7:24 a.m.
12.12.19 03:22, Stephen J. Turnbull пише:
I would prefer that it not be implemented at all, but if it is implemented, its behavior should respect the intuition of the majority of those who want it, which seems to me to be "a variant of next() that doesn't raise and returns None by default on an empty iterable."
This is not what the majority expects and is not how first() from more-itertools works. A variant of next() that doesn't raise and returns None on an empty iterable is a 2-arguments next().