Cathing several potential errors?

Wojtek Walczak gminick at bzt.bzt
Sun Sep 7 00:32:47 CEST 2008


On Sat, 6 Sep 2008 15:13:45 -0700 (PDT), cnb wrote:
> if i do
> try:
>     something
> except TypeError, IndexError:
>     pass

Parenthesize them:

except (TypeError, IndexError):

-- 
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/



More information about the Python-list mailing list