[Python-ideas] Can we add "zip and assert equal length" to the standard library?

Jonathan Fine jfine2358 at gmail.com
Sat Jul 28 04:58:05 EDT 2018

Hi All

I've followed my own advice, earlier in this thread. The newly created
repository https://github.com/jfine2358/py-jfine2358 contains personal
Python code that others might find useful.

And you'll find in it:

def zipclose(*argv, close):
    '''As zip(*argv), but call close before raising StopIteration.


Given zipclose, we can solve Peter's problem by writing a suitable
close function. And some other problems can be solved, by using a
different close function. Comment on my code at
https://github.com/jfine2358/py-jfine2358/issues (preferred), or on
this thread.

Finally, thank you Peter for another good problem.


More information about the Python-ideas mailing list