How do I know all thrown exceptions of a function?
Carel Fellinger
cfelling at iae.nl
Mon Jan 22 21:13:38 EST 2001
Steve Williams <sandj.williams at gte.net> wrote:
...
> Ah yes, but ftplib (and the example in the code and in Beazley) does the
> following:
...example snipped
My point was that instead of
> from somelib import somefunc
you should use
import somelib
then the following would work
> try:
> somelib.somefunc()
> except somelib.myError:
> 'do something about it'
--
groetjes, carel
More information about the Python-list
mailing list