(a==b) ? 'Yes' : 'No'

Aahz aahz at pythoncraft.com
Mon Apr 12 00:35:49 EDT 2010


In article <mailman.1330.1269981186.23598.python-list at python.org>,
Steve Holden  <steve at holdenweb.com> wrote:
>
>It exists because people nagged Guido mercilessly until, against his
>better judgment, he capitulated.

No, the ternary exists because he became convinced that it was the
lesser evil compared with letting the abomination of

A and B or C

remain the "Pythonic" ternary and someone came up with a syntax that
wasn't completely painful.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan



More information about the Python-list mailing list