[Tutor] Catching warnings?

Liam Clarke cyresse at gmail.com
Tue Oct 19 14:10:00 CEST 2004

Hi all, 

Just a quick question, catching errors is easy, but how to go about
catching errors? I'd like to squelch a deprecation warning. I know the
module's deprecated, but it's useful for the moment.

So far I've filtered it with Warnings.filterwarnings, but the docs
state that warning are technically exceptions. Can you catch them the
same way you can catch error codes?

Oh, and personally, I think I just met the most subtle way of saying
'You're missing a closed bracket' -

Token Error: EOF in multi-line statement


More information about the Tutor mailing list