What about try:except:finally
Matthew Schinckel
baron at null.net
Sat Jul 8 23:25:23 EDT 2000
On Jul 8, I overheard Alan Daniels mutter:
> On Fri, 07 Jul 2000 13:20:25 GMT, Thomas Weholt <thomas at cintra.no> wrote:
>
> [paraphrased...]
> >Does python support, or if not, would it be cool to have support for
> >try/except/finally?
>
> No, but just use try/except/else instead. Why it's "else" instead of
> "finally", I have no idea, but this works just fine. Example:
Yes, but if you want a statement executed regardless of whether there was
an exception or not, you need to use a finally clause.
--
Matthew Schinckel <matt at null.net>
What this country needs is a good five cent microcomputer.
More information about the Python-list
mailing list