Slight irritation with try/finally indentation

Roy Smith roy at panix.com
Fri May 3 20:40:57 EDT 2002


Mikko Rantalainen <mira at st.jyu.fi> wrote:
> Why not the following?
> 
>     try:
>         setup()
>         process()
>     finally:
>         cleanup()

That changes the semantics.  Now you're catching errors in setup() as well 
as in process().  If that's what you want, fine, but don't change the 
semantics just to make it looks pretty.



More information about the Python-list mailing list