On Tue, 21 Apr 2020 16:05:54 +0100 Paul Moore <p.f.moore@gmail.com> wrote:
To be clear - would you catch the error in your code? What would you do when it was raised? Or are you simply wanting, in effect, an assert when some iterables remain unexhausted? Because I can imagine that wanting builtins to assert when their preconditions are untrue is something that might be considered a more common desire - but it's a much wider change in design philosophy than just zip().
Picking a nit, this has to be a post condition rather than a precondition, because you can't tell how long an iterator is without consuming it. But at that point, why would zip have a post condition involving the caller's iterables? -- “Atoms are not things.” – Werner Heisenberg Dan Sommers, http://www.tombstonezero.net/dan