(test) ? a:b
python at mrabarnett.plus.com
Thu Oct 23 12:12:57 CEST 2014
On 2014-10-23 04:46, Gregory Ewing wrote:
> Chris Angelico wrote:
>> I've seen much MUCH worse... where multiple conditional
>> expressions get combined arithmetically, and then the result used
> In the days of old-school BASIC it was common to
> exploit the fact that boolean expressions evaluated
> to 0 or 1 (or -1, depending on your dialect :) to
> achieve conditional expressions or other tricks.
> Probably forgiveable, given that there were no real
> conditional expressions, and every byte of your 48K
> or less of RAM was precious...
More information about the Python-list