[Python-ideas] Possible new itertool: comm()

Paul Moore p.f.moore at gmail.com
Tue Jan 6 19:30:11 CET 2015


On 6 January 2015 at 18:28, Ethan Furman <ethan at stoneleaf.us> wrote:
> On 01/06/2015 10:00 AM, Steven D'Aprano wrote:
>
>>     a = next(it1, MISSING)
>>     b = next(it2, MISSING)
>
> Don't forget to guard your next calls -- RunTimeError would not be a friendly way to stop iterating.  ;)

Doesn't the second argument get used instead of raising StopIteration?
Paul


More information about the Python-ideas mailing list