conditional expressions

Erik Max Francis max at alcyone.com
Thu Sep 19 04:23:54 CEST 2002


"daniel w. moore" wrote:

> It's occurred to me after some brainstorming on the subject that the
> C/perl construct
> 
>   a ? b : c
> 
> can be arranged like this in python:
	...
> Has anyone put this to good use, i wonder?
> Or have I just made a daring and heroic discovery in my own particular
> idiom ;)

Sorry, but no, this isn't new.  A variation is mentioned in the FAQ and
these two variants -- using and/or combinations and lambdas -- gets
discussed in the group frequently.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ When you love somebody, you're always in trouble.
\__/ Col. Sherman Potter
    Bosskey.net: Quake III Arena / http://www.bosskey.net/q3a/
 A personal guide to Quake III Arena.



More information about the Python-list mailing list