Try block problem

Jeff Davis jdavis at empires.org
Mon Nov 19 23:51:53 EST 2001


        It seems like the following makes sense to me:

try:
        ...
except:
        ...
finally:
        ...

I know it doesn't work, my question is: why? Is it difficult to implement 
in python? Does it promote some kind of "bad coding"? Is there a logical 
flaw (i.e. maybe it doesn't make sense in all contexts)?

I know that Ruby has it implemented similarly with 
begin...rescue...ensure, which brings another question: does every 
language make new keywords for the same concept of exceptions, or are they 
different somehow?

Regards,
        Jeff



More information about the Python-list mailing list