What about try:except:finally

Peter Schneider-Kamp petersc at stud.ntnu.no
Fri Jul 7 11:58:54 EDT 2000


Thomas Weholt wrote:
> 
> try:
>         # some code
> except :
>         # catch exception
> finally:
>         # clean up whatever

You can always use

try:
  try:
    # some code
  except:
    # catch exception
finally:
  # clean up whatever

Not quite as elegant, but do we really need
an extra syntax for that?

wanting-orthogonal-persistence-ly y'rs
Peter
--
Peter Schneider-Kamp          ++47-7388-7331
Herman Krags veg 51-11        mailto:peter at schneider-kamp.de
N-7050 Trondheim              http://schneider-kamp.de




More information about the Python-list mailing list