For review: PEP 308 - If-then-else expression

Erik Max Francis max at alcyone.com
Sat Feb 8 12:52:37 EST 2003


Sean Ross wrote:

> Mostly, I just wanted to avoid a specific edge case someone mention
> much
> earlier in the thread:
> 
>     if x if C else y:
>         ...do stuff...
	[and then other variations with this same edge case]

Sure, it's ugly, but this really is a serious edge case.  I can't recall
ever seeing the conditional operator being used simply in an if
statement a la

	if (C ? x : y)
	    ...

so I really don't know how much usefulness this is example of how ugly
an edge case can get provides.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Men live by forgetting -- women live on memories.
\__/ T.S. Eliot
    REALpolitik / http://www.realpolitik.com/
 Get your own customized newsfeed online in realtime ... for free!




More information about the Python-list mailing list