On Tue, 21 Apr 2020 at 17:53, Serhiy Storchaka <storchaka@gmail.com> wrote:
21.04.20 19:35, Paul Moore пише:
Hence my suggestion that maybe it's not so much an (actionable) exception that people want as an assertion.
What do you mean by assertion? Raising an AssertionError? Crashing the program?
See the original question I asked - I suspect that people asking for this feature don't ever imagine catching the exception (or at least, not for any other reason than to terminate the program saying "this should not have happened") so it's more of a "cannot happen" type of check than an exception in the more general sense that something like a ValueError would be intended. But it's not a big distinction, merely one of intent. And as yet, the person who claimed that wanting an exception from zip was an overwhelmingly common case for them hasn't replied yet to my question - so I may be completely wrong. Paul