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

Andrew Koenig ark at research.att.com
Sun Feb 9 21:36:05 EST 2003


Erik> Georg Mischler wrote:
>> At first I thought "eeek!", but five seconds later it already
>> started to look familiar and intuitive.

Erik> The combination of the punctuation and a keyword still gives me an eek.

Me too.  But seriously, what's wrong with

    x = if y < 5: "Yep" else: "Nope"

I would hope the meaning is immediately obvious...

-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark




More information about the Python-list mailing list