Hi Jakub,

2010/8/3 Jakub Wilk <[email protected]>:
> You might be easily mislead into thinking that this code
>
>   try:
>      eggs()
>   except IOError, OSError:
>      pass
>
> will catch both IOError and OSError exceptions. In fact, it will not, as it
> is more or less equivalent to:
>
>   try:
>      eggs()
>   except IOError, ex:
>      OSError = ex  # Whoo, overwrite the built-in name

Just a reference to how properly catch them:
http://docs.python.org/tutorial/errors.html#handling-exceptions

> Sandro Tosi <[email protected]>
>   python-reportbug (U)

Fixed at 85174c0: thanks!

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: 
http://lists.debian.org/[email protected]

Reply via email to