Question about exception-handling mechanism

Carel Fellinger cfelling at iae.nl
Tue Apr 25 18:45:46 EDT 2000


Jerome Chan <eviltofu at rocketmail.com> wrote:

...
> Does this mean I can't do
> try:
>     x = MyClass("s")
>     # some other stuff that might raise an exception
> except Exception,message:
>     print message
> else:
>     print "something went wrong but I don't know what it is!"
> finally:
>     del x # or some other function

No, it's either a single finally clause or the except/else bit.
-- 
groetjes, carel



More information about the Python-list mailing list