Conditional expressions (again)

Erik Max Francis max at alcyone.com
Thu Oct 25 13:44:17 EDT 2001


gbreed at cix.compulink.co.uk wrote:

> I don't remember "elif" being generally supported.  Or a good argument
> against
> 
>                 x = b if a else (d if c else e)
> 
> unless you count "P*rl has something like that" as a good
> counter-argument.

Nested conditional expressions get extremely hard to read very quickly. 
If the syntax can support this directly and more clearly and people
support it, that seems a much better option.  (Not that I use
conditional operators for complex comparisons anyway.)

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Who shall stand guard to the guards themselves?
\__/ Juvenal
    Alcyone Systems' CatCam / http://www.catcam.com/
 What do your pets do all day while you're at work?  Find out.



More information about the Python-list mailing list