2 ms·
>> the ternary operator/statement (... ? ... : ...) > Retort: Python 2.5 has conditional expressions http://www.python.org/dev/peps/pep-0308/ http://www.python
by scotty79 16y ago
>> the ternary operator/statement (... ? ... : ...)
> Retort: Python 2.5 has conditional expressions
http://www.python.org/dev/peps/pep-0308/ http://www.python.org/dev/peps/pep-0308/ looks more like a hack than a feature
- koenigdavidmj 16y agoHow's it a hack? They went through the entire standard library, saw that the construct was generally used for the occasional exception to the common case, and front-loaded the common case expression. The principle was that the important thing should go up front.
- scotty79 16y agoYou are right. I misread this PEP. Sorry.