Slight irritation with try/finally indentation
Lumberjack
lumber at jack.com
Fri May 3 21:20:33 EDT 2002
pinard at iro.umontreal.ca (François 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.
"We"? Who else are you speaking for?
> Are others on this list bothered with this issue?
So far you seem to be crying alone.
> And if yes, what do you choose to do?
I suggest you and anyone else similarly afflicted with low irritant
thresholds find another language, if any exists, where you are not so
easily irritated. Or do something silly like:
try_Setup() # One way.
____Setup() # Another way.
try:
Process()
finally:
Cleanup()
Whatever you do, please don't propose a PEP as a "solution"!
More information about the Python-list
mailing list