What about try:except:finally
Alan Daniels
daniels at mindspring.com
Sat Jul 8 12:20:06 EDT 2000
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:
try:
x = 1
except NameError:
print "Ack!"
else:
print "Woohoo!"
--
============================================================
Alan Daniels
daniels at mindspring.com
More information about the Python-list
mailing list