> the language lacks a “throws” statement
I'm not sure what you mean by this? Python has the "raise" statement [0], which "throws" an error from within a function or other code.
[0] https://docs.python.org/3/reference/simple_stmts.html#raise
I'm not sure what you mean by this? Python has the "raise" statement [0], which "throws" an error from within a function or other code.
[0] https://docs.python.org/3/reference/simple_stmts.html#raise
The ironic thing is that Checked Exceptions aren't particularly well-loved in Java. For example, Kotlin (which is like Java++) did away with them.
Python does not have that.
Plus, the typing annotations could presumably be expanded to include some notification to declare raised exception types explicitly.