Loop-and-a-half (Re: Curious assignment behaviour)

Markus Schaber markus at schabi.de
Mon Oct 15 10:17:02 EDT 2001


Hi,

Steve Holden <sholden at holdenweb.com> schrub:

> And so perhaps by extension
> 
>     x = if e1 then e2 elif e3 then e4 else e5

Looks good and readable.

+1 from me.
 
> ? Yet again starting to look a little Lispish. Of course, eventually
> people will be posting asking us to debug
> 
>     x = if if e1 then e2 else e3 then e4 else e5
> 
> and similar. But then every language has its abusers <wink>.

I think it is not worse than other weird one-liners we already had here 
:-)

markus
-- 
You don't have to be Microsoft to suck... but it helps.
(Tim Hammerquist in comp.lang.python)



More information about the Python-list mailing list