(test) ? a:b

alister alister.nospam.ware at ntlworld.com
Wed Oct 22 11:12:36 EDT 2014


On Wed, 22 Oct 2014 12:41:49 +0100, Mark Lawrence wrote:

> On 22/10/2014 10:27, Chris Angelico wrote:
>> 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...
>>
>> ChrisA
>>
>>
> Perhaps you're correct.  Is there anything worse than looking at a
> dreadful piece of code that makes no sense at all and knowing that you'd
> written it six months earlier?

looking a a dreadful piece of unreadable & unfathomable code & knowing 
you wrote it only Yesterday ;-) 



-- 
Chamberlain's Laws:
	(1) The big guys always win.
	(2) Everything tastes more or less like chicken.



More information about the Python-list mailing list