How to catch str exception?

Paul Rubin http
Fri May 15 16:36:26 EDT 2009

"anuraguniyal at" <anuraguniyal at> writes:
> there are many such exceptions and hence it is not feasible to catch
> them all or know them all unless i go thru src code.

But that is true of all exceptions.  The alternative seems to be a
"checked exception" scheme like Java's, which in practice imposes a
huge pain on programmers, who have to modify type signatures all up
and down the call hierarchy every time they raise another exception at
the bottom level.

More information about the Python-list mailing list