Newbie naive question ... int() throws ValueError
Devin Jeanpierre
jeanpierreda at gmail.com
Fri May 11 15:34:34 EDT 2012
On Fri, May 11, 2012 at 2:10 AM, Chris Angelico <rosuav at gmail.com> wrote:
> Unlike in Java, a function's list of things it can throw isn't part of
> its signature. Instead of trying to catch every possible exception,
> it's generally best to simply let exceptions propagate unless you KNOW
> you're expecting them.
How am I supposed to know to expect them, if they are undocumented?
Trial and error? That seems like a poor replacement for documented
error conditions.
-- Devin
More information about the Python-list
mailing list