Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #101824
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Bernardo Sulzbach <mafagafogigante@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Using 'Or' |
| Date | Sat, 16 Jan 2016 21:12:31 -0200 |
| Lines | 16 |
| Message-ID | <mailman.48.1452985992.15297.python-list@python.org> (permalink) |
| References | <mailman.37.1452938481.15297.python-list@python.org> <48smy.82436$Dn6.27537@fx46.am4> <569abbf3$0$1603$c3e8da3$5496439d@news.astraweb.com> <mMzmy.46103$Yh.17821@fx36.am4> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de tJNo7/zfpo0ilUNSxVjInwAHD/rh/X7GGhR5mBGrZnfw== |
| Return-Path | <mafagafogigante@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.033 |
| X-Spam-Evidence | '*H*': 0.93; '*S*': 0.00; '16,': 0.03; 'jan': 0.11; "'('": 0.16; "')'": 0.16; '2016': 0.16; 'agree.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'sat,': 0.23; 'header:In-Reply-To:1': 0.24; 'least': 0.27; 'message-id:@mail.gmail.com': 0.27; 'spaces': 0.29; 'code': 0.30; 'received:209.85.215.46': 0.30; 'received:google.com': 0.35; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'hope': 0.61; 'default': 0.61; 'production': 0.67; 'bernardo': 0.84; 'subject:Using': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Hs5xZF5aVauq5Ikx8MT3xVnnE+G/c0KmeVMk6AjXZTI=; b=Z7WIRtWyI4uV1mQelynA7VdqU3/+rMl++ONZeAIbvZ7ElQ56Kxar0eFOWkHFKTmQcR eWv4w2XlYPUYkjCN47kOGPuujWgXkoOPQ890uipyzsMVErhLniBMC6Vo8BgCN9p7iGQS E5uOcZxvJmxtVbkMf9AdUF7xytcceCzejENf8NJHadeCUlUoCW3sqFnTTnjdRpOBCapP U0inNAYRFoWvTBFkWB0i396/bPL3siHoiADr2LUSV8kwqUrGgwE31a9aRMVpaCOAmUbP PxZrhTRzXOkyo8Zh4xBjnyP7DuSEliEW175ScxPrD8o7r3riZppLxVgOFb6opdeBEARZ XkFw== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=Hs5xZF5aVauq5Ikx8MT3xVnnE+G/c0KmeVMk6AjXZTI=; b=jw1Vs+lzEbGkFXNtd0mc6c/RjlW+6bpn+fxYgn2TwBGpgArMmqgc5CYDUDA++pxhNg MnajgFWlLZJQRnaD9XD//czBIuJKmhxnGfUE9hdIk6ojqincVRJp/iXkSjufo4P2EG2v e9qMo9OmkHuDMFUhuuhE3oGFJYNoXaYXjN0F9uACdrPQRmoZzwAkfXTzow8F6H+wt8a3 sB8gw0gLqtWQ9YsPP3HWeYRZ4xe57CkxYgT9fSiWMKc6Xa4jbEJPeymcj7yQYWxMwFBI XVnUsYkK3fSpg70VqLL+2JaoR17GQTIzs/Bz551sZ1zNgcsmdYXS3ASdumi8xvHmbqa6 E6fQ== |
| X-Gm-Message-State | ALoCoQm5Y+UCHLpwfWf4pwzt9tZkawiKm2YPH7lZQnCCt0j6hgCR6G2s3IU/R/+rI4XM8D+FFjr8ugEN8QEbRA3fSzEC8kOCQQ== |
| X-Received | by 10.25.153.79 with SMTP id b76mr5857862lfe.102.1452985990517; Sat, 16 Jan 2016 15:13:10 -0800 (PST) |
| In-Reply-To | <mMzmy.46103$Yh.17821@fx36.am4> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:101824 |
Show key headers only | View raw
On Sat, Jan 16, 2016 at 8:47 PM, Alister <alister.ware@ntlworld.com> wrote:
>>
>> default = "I like Brussels sprouts."
>> message = random.choice(["", "I like boiled cabbage."])
>> print( message or default )
>>
>>
>>
> I hope I never see production code like that
>
I agree. If you are going to use spaces after '(' and before ')' at
least be consistent.
--
Bernardo Sulzbach
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Using 'Or' Kitten Corner <joshua.shapo@gmail.com> - 2016-01-15 15:24 -0500
Re: Using 'Or' Christian Gollwitzer <auriocus@gmx.de> - 2016-01-16 12:03 +0100
Re: Using 'Or' Marko Rauhamaa <marko@pacujo.net> - 2016-01-16 14:41 +0200
Re: Using 'Or' Alister <alister.ware@ntlworld.com> - 2016-01-16 14:06 +0000
Re: Using 'Or' Steven D'Aprano <steve@pearwood.info> - 2016-01-17 08:53 +1100
Re: Using 'Or' Alister <alister.ware@ntlworld.com> - 2016-01-16 22:47 +0000
Re: Using 'Or' Bernardo Sulzbach <mafagafogigante@gmail.com> - 2016-01-16 21:12 -0200
Re: Using 'Or' Chris Angelico <rosuav@gmail.com> - 2016-01-17 10:15 +1100
csiph-web