3 ms·
> I'm just saying that if you need a function to handle all exceptions, the type system should be powerful enough to express that. I disagree, in part because
by dragonwriter 3y ago
> I'm just saying that if you need a function to handle all exceptions, the type system should be powerful enough to express that.
I disagree, in part because “handles all exceptions” is a lie; exceptions can occur at any point, including in exception-hnadling code.
It is not possible to have a Python function which provides the guarantee you want, so it makes no sense to have a Python type system which expressed it: it will either be never used or a lie.
If you think you need this guarantee, you need to step back and ask what the functional requirement actually is and find a different way of meeting it.