exceptions from modules

Erik Max Francis max at alcyone.com
Fri Aug 24 01:42:12 CEST 2001

"Matthew D. Wood" wrote:

> However, I have seen PLENTY of examples of modules that seemingly defy
> scoping rules in the way they present their exceptions to the world.
> And instead you can write:
> except my_exception, value :
> How do they do that?  Where is the exception defined?

Do you have an example?  Probably the user of the module was using the
from module import * trick, even if it wasn't immediately obvious.

 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Sometimes there's no point in giving up.
\__/ Louis Wu
    Kepler's laws / http://www.alcyone.com/max/physics/kepler/
 A proof of Kepler's laws.

More information about the Python-list mailing list