[Tutor] question regarding python exception handling

Roy roydebox at gmail.com
Sun Jan 30 07:47:38 CET 2005


Hello, there:

I am learning about python exception handling. I am reading "Python in
a Nutshell". In the chapter of exception handling, it says: Note that
the try/finally form is distinct from the try/except form: a try
statement cannot have both except and finally clauses, as execution
order might be ambiguous.

I don't understand the reason why except and finally clauses cannot be
together. I know they can be together in java. how does it cause
ambiguous execution order? An example may help me understand.

Thank you very much!

--
Roy

**May I open-source your mind?**


More information about the Tutor mailing list