Here's something that would have saved me some debugging yesterday:

    >>> zipped = zip(x, y, z, strict=True)

I suggest that `strict=True` would ensure that all the iterables have been
exhausted, raising an exception otherwise.

This is useful in cases where you're assuming that the iterables all have
the same lengths. When your assumption is wrong, you currently just get a
shorter result, and it could take you a while to figure out why it's
happening.

What do you think?
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/6GFUADSQ5JTF7W7OGWF7XF2NH2XUTUQM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to