by weatherlight · 5y ago · 0 comments
The alternative I've seen tends to be something like "set $faulted when you realize something is unrecoverable, then make sure the entire rest of the function checks for it and makes sure not to do anything else if we've already identified a fault."
http://open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0709r0....
This is likely inspired by the Error monad in Haskell, and the doc might say so explicitly (I don't remember).
It's not clear what you mean here: the proposal is not changing any user-facing functionality, just making something faster that already existed. As far as I know Python has always had exceptions.