Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'correct.': 0.07; 'expressions': 0.07; '22,': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:test': 0.09; 'worse': 0.09; 'language.': 0.14; 'amendment': 0.16; 'conditional': 0.16; 'guilty': 0.16; "internet's": 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'language': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'written': 0.21; '>>>': 0.22; 'header:User- Agent:1': 0.23; "i've": 0.25; 'equivalent': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; "doesn't": 0.30; "i'm": 0.30; 'code': 0.31; 'piece': 0.31; 'community': 0.33; 'sense': 0.34; 'google': 0.35; 'there': 0.35; 'should': 0.36; 'two': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'no.': 0.61; "you're": 0.61; 'myself': 0.63; 'our': 0.64; 'charset:windows-1252': 0.65; 'six': 0.68; 'groups.': 0.74; 'constitution': 0.84; 'death,': 0.84; 'penalty': 0.84; 'subject::': 0.85; 'not:': 0.91; 'same,': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: (test) ? a:b Date: Wed, 22 Oct 2014 12:41:49 +0100 References: <54476af8$0$21651$426a74cc@news.free.fr> <7839376e-fc27-4299-ae63-4ddf17ef9a8a@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-92-22-93-150.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1413978124 news.xs4all.nl 2877 [2001:888:2000:d::a6]:35037 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79436 On 22/10/2014 10:27, Chris Angelico wrote: > On Wed, Oct 22, 2014 at 8:16 PM, Mark Lawrence 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? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence