On Sat, May 12, 2012 at 2:11 PM, Devin Jeanpierre
<jeanpierr...@gmail.com> wrote:
> I'm not talking about unexpected exceptions. I'm saying, if I expect
> invalid input for int, where should I go to find out how to deal with
> said invalid input properly? How do I know that int raises ValueError
> on failure, and not, for example, something like ArgumentError
> (something that Python doesn't have) or (like chr) TypeError?

Ah, I see what you mean.

The easiest way to find out what exception gets thrown is to try it.
For obvious things like int("foo") you can simply test it in the
interactive interpreter; unusual cases you'll discover as you run your
script.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to