Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4a.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.046 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.01; 'expressions': 0.07; '22,': 0.09; 'lawrence': 0.09; 'subject:test': 0.09; 'cc:addr:python- list': 0.11; 'amendment': 0.16; 'conditional': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'guilty': 0.16; "internet's": 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; "i've": 0.25; 'equivalent': 0.26; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'community': 0.33; 'received:google.com': 0.35; 'google': 0.35; 'should': 0.36; 'two': 0.37; 'pm,': 0.38; 'no.': 0.61; 'myself': 0.63; 'groups.': 0.74; 'constitution': 0.84; 'death,': 0.84; 'penalty': 0.84; 'subject::': 0.85; 'not:': 0.91; 'same,': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=RClWiJHMZHTNJJHEexX9h3mo16Wro2Ev396crfNT3Og=; b=ZXUOJvVzFSZFzJiWhypyhrR44iuyFiIgWA5a5QcyGVDLWay/Qz8sPMT7uNfknly0By qhvNZKJ+JtMEffEMsFGyyHyAIkyR37HTZFFWqy9ngsnl3cIoXpNAEidasLaPNwk9BDCx IaJy+gzspE0B42IBiE7BLnue7PBsj2Mll3lLIE7zqUxrORAQbivVVU/U0ACS/xTOQ39z Zarnstq0DvWuWHItybLATfwlm60Nbu7z14x1c8jVASVVpPKCri5/Oi738hUk2drX2HoB qDBISM4ugcFCFQUpWDXZrQVrEOi9xdul5ODr52mI5b8OvZ3tZISQ8OqGuVxr55VGGJ4C 5PLA== MIME-Version: 1.0 X-Received: by 10.50.60.97 with SMTP id g1mr33426372igr.2.1413970053260; Wed, 22 Oct 2014 02:27:33 -0700 (PDT) In-Reply-To: References: <54476af8$0$21651$426a74cc@news.free.fr> <7839376e-fc27-4299-ae63-4ddf17ef9a8a@googlegroups.com> Date: Wed, 22 Oct 2014 20:27:33 +1100 Subject: Re: (test) ? a:b From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1413971583 news.xs4all.nl 2883 [2001:888:2000:d::a6]:44602 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79425 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