One-liner blocks (was Re: accessing a functions var from a subfunction.)
aleax at aleax.it
Thu Apr 17 15:55:52 CEST 2003
>>Note that Guido deeply regrets permitting one-line blocks; this is
>>something he may try fixing for Python 3.0.
> Eh? Rationale?
let me try to channel GvR (even though I'm quite a fan of one-line
blocks myself, particularly for such idioms as "if <xxx>: break")...:
Having MTOWTDI ain't Pythonic. The ability to write either:
if finished: break
OR quite equivalently
is therefore a wart. If only one of the two must survive, it's
clearly the second one (more general). This will also ease the
task of semi-bright editors (right now, my GVIM tries to help
me by autoindenting right after each such "one-line block"...).
More information about the Python-list