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

Erik Max Francis max at alcyone.com
Sat Feb 8 00:17:23 EST 2003


Roy Smith wrote:

> Or worse, you make the wrong generalization.  If I can write "x = y if
> y
> > x else x" then way can't I do the same thing with other statement
> keywords?  Perhaps I can write "myModule = import foo" as well?
> No?  Why not?  Why does "if" have a dual role, but not the other
> keywords?

I don't know, this argument just doesn't really strike a chord with me
anywhere.  You could make the same argument about the + operator: 
Sometimes it means one thing, sometimes it means another.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ The doors of Heaven and Hell are adjacent and identical.
\__/ Nikos Kazantzakis
    Bosskey.net: Return to Wolfenstein / http://www.bosskey.net/rtcw/
 A personal guide to Return to Castle Wolfenstein.




More information about the Python-list mailing list