One-liner blocks (was Re: accessing a functions var from a subfunction.)

Aahz aahz at pythoncraft.com
Thu Apr 17 10:48:27 EDT 2003


In article <Inyna.27603$LB6.635831 at news1.tin.it>,
Alex Martelli  <aleax at aleax.it> wrote:
>
>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
>
>    if finished:
>        break
>
>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"...).

That's not the main reason, though.  The main reason is that Guido
believes that control structures should stand out clearly.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Why is this newsgroup different from all other newsgroups?




More information about the Python-list mailing list