Try block problem

Bernhard Herzog bh at intevation.de
Tue Nov 20 06:07:57 EST 2001


Jeff Davis <jdavis at empires.org> writes:

> I am not sure you understood my question. I wanted to know why the 
> "finally" could not be used with "try", i.e. why did the developers of 

The original question was about "try" and both "except" and "finally".
(just for clarification to get the context right)

> python choose to make the language that way.

IIRC, the reason is that the precise sematics are not clear in every
situation. For instance, what happens if an exception is raised in an
except clause? Should the finally clause be executed in that case or
not?

  Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
MapIt!                                               http://mapit.de/



More information about the Python-list mailing list