Slight irritation with try/finally indentation
holger krekel
pyth at devel.trillke.net
Fri May 3 14:48:42 EDT 2002
David C. Ullrich wrote:
> On 24 Apr 2002 10:14:45 -0400, pinard at iro.umontreal.ca
> (=?iso-8859-1?q?Fran=E7ois?= Pinard) wrote:
>
> [...]
> >
> > [...]
> > setup()
> > try:
> > process()
> > finally:
> > cleanup()
> > [...]
> >
> >What I find irritating is that `cleanup()' is not aligned anymore with
> >`setup()', as it was originally, so we loose on the legibility of the
> >parenthetical idiom we wanted to stress.
>
> Exactly the same thing bothered me years ago with try-finally in
> another language (where the indentation was optional). I never
> got around to complaining about it, though...
Out of curiosity how would you actually make up the rules:
try:
...
finally:
dothis()
dothat()
Now how do you know if 'dothat' is included or excluded
in the finally-code block?
i would find *that* irritating.
holger
More information about the Python-list
mailing list