(test) ? a:b

Chris Angelico rosuav at gmail.com
Wed Oct 22 11:27:33 CEST 2014

On Wed, Oct 22, 2014 at 8:16 PM, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
>> without not:
>> j = [j+1, 3][j>=10]
>> with not:
>> j = [3, j+1][not (j>=10)]
> The death penalty should be reintroduced into the UK for two crimes, writing
> code like the above and using google groups.

No no no. Code like that doesn't deserve death, just community
service. I've seen much MUCH worse... where multiple conditional
expressions get combined arithmetically, and then the result used
somewhere... I also may have been guilty of same, myself, though I'm
going to plead the internet's equivalent of the Fifth Amendment to the
US Constitution and not incriminate myself by showing the code...


More information about the Python-list mailing list