try...finally is more powerful than I thought.

Georgy Pruss SEE_AT_THE_END at hotmail.com
Sat Nov 8 01:28:29 CET 2003


"Mauro Cicognini" <mcicogni at siosistemi.it> wrote in message news:bogm9e$bn3$1 at grillo.cs.interbusiness.it...
>
> <,,,>
> try:
>   try:
>     ...
>   finally:
>     ...
> except:
>   ...
>
> to achieve the same effect.
>
> Am I right? I.e. (again) how do you people use try .. finally in real
> use cases?
>
> Does anyone else think Python could have a nicer syntax for this one?

That's probably why they called it begin...rescue in Ruby :)
G-:

>
> Mauro






More information about the Python-list mailing list