Python and checked exceptions
ldo at geek-central.gen.new_zealand
Sat Sep 23 14:01:34 CEST 2006
In message <1159009493.872015.33880 at d34g2000cwd.googlegroups.com>, Kay
> A new cookbook recipe suggesting two decorators @throws and @catches
> for treatment of checked exceptions in Python:
> This might be of practical interest for some and theoretical interest
> for others - in particular those who know checked ex as a language
> feature of Java.
The trouble with having to declare every possible exception that a function
might throw is that it rapidly turns into a complete mess. That's why such
declarations are optional in C++, and only semi-mandatory in Java.
More information about the Python-list