Search a sequence for its minimum and stop as soon as the lowest possible value is found

Jussi Piitulainen jussi.piitulainen at helsinki.fi
Sun Jan 8 08:16:16 EST 2017


Paul Rubin writes:

> I think Python's version of iterators is actually buggy and at least
> the first element of the rest of the sequence should be preserved.
> There are ways to fake it but they're too messy for something like
> this.  It should be the default and might have been a good change for
> Python 3.

It could still be added as an option, to both takewhile and iter(_, _).



More information about the Python-list mailing list