Deutsch   English   Français   Italiano  
<mailman.104.1710623959.3452.python-list@python.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: dn <PythonList@DancesWithMice.info>
Newsgroups: comp.lang.python
Subject: Re: Configuring an object via a dictionary
Date: Sun, 17 Mar 2024 10:19:10 +1300
Organization: DWM
Lines: 21
Message-ID: <mailman.104.1710623959.3452.python-list@python.org>
References: <b169e599-e81f-45ce-8e2a-7027b59a4627@tompassin.net>
 <60E92E67-1412-4DE6-B330-495343107474@barrys-emacs.org>
 <cae8bb0c-fe89-4c6a-845f-d0d691207e2e@DancesWithMice.info>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de bqBzCblB3CqPWNj9DWMqvwdVg2McYjNswv6D5DEW11kQ==
Cancel-Lock: sha1:WpxIbb5zbsVirSRUxcXWjL2iV1o= sha256:I/eqH16GmR5xoepLP9oEBBEpcP33jjkdn336/JgYEKk=
Return-Path: <PythonList@DancesWithMice.info>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
 reason="2048-bit key; unprotected key"
 header.d=danceswithmice.info header.i=@danceswithmice.info
 header.b=WjN3bI5t; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'mar': 0.07; 'please?':
 0.07; '=dn': 0.09; 'fails': 0.09; 'from:addr:danceswithmice.info':
 0.09; 'from:addr:pythonlist': 0.09; 'values.': 0.09; 'barry':
 0.16; 'hand,': 0.16; 'idiom': 0.16; 'message-
 id:@DancesWithMice.info': 0.16; 'received:51.254': 0.16;
 'received:51.254.211': 0.16; 'received:51.254.211.219': 0.16;
 'received:cloud': 0.16; 'received:rangi.cloud': 0.16; 'wrote:':
 0.16; 'problem': 0.16; 'to:addr:python-list': 0.20; "i've": 0.22;
 'examples': 0.25; 'bit': 0.27; 'header:User-Agent:1': 0.30;
 'header:Organization:1': 0.31; 'gotten': 0.32; 'python-list':
 0.32; 'received:192.168.1': 0.32; 'able': 0.34; 'header:In-Reply-
 To:1': 0.34; 'fix': 0.36; 'errors': 0.36; 'those': 0.36; 'using':
 0.37; 'received:192.168': 0.37; 'list': 0.39; 'skip:i 20': 0.62;
 'received:51': 0.64; 'production': 0.71
DKIM-Filter: OpenDKIM Filter v2.11.0 vps.rangi.cloud 1EAFF3522
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=danceswithmice.info;
 s=staff; t=1710623956;
 bh=NgLoIlXqLoCtFmBMdmvTltf3G4eUDseY2M2HdWpLuq4=;
 h=Date:From:Subject:To:References:In-Reply-To:From;
 b=WjN3bI5tAa2O4uLcWdN3VGmAqCzLC6YJTRsAnwLKL2TGKnld+8UHpVRWwtkptwGb5
 FG8HTe/xyv3tT4wXRaPYrzuMZ8BVN9MSXQMAdVo2hQ9+SyqXFdzVI5P043/caO3NMm
 wmAYk09RtyhEYmgi5qPdLvKgw8P0etGMtFIev5Jn/bi/YjEkCSgiTBpIkdxYImCWp+
 zwiU+wWJWHGOD7VtbzgX2sEt//wpeL3CwGvu3o327rCYDhzQROTrY+HrQDKzTEulh7
 hRtZEgz/3MYkzoqXlMvhHQ0zvtwiHwKyOcIKHuiHsMyLZo72kIYJ+mThnH+fjPkPkS
 uSLjxVqHiM7Ug==
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <60E92E67-1412-4DE6-B330-495343107474@barrys-emacs.org>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
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: <https://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>
X-Mailman-Original-Message-ID: <cae8bb0c-fe89-4c6a-845f-d0d691207e2e@DancesWithMice.info>
X-Mailman-Original-References: <b169e599-e81f-45ce-8e2a-7027b59a4627@tompassin.net>
 <60E92E67-1412-4DE6-B330-495343107474@barrys-emacs.org>
Bytes: 4419

On 16/03/24 21:15, Barry via Python-list wrote:
> 
> 
>> On 15 Mar 2024, at 19:51, Thomas Passin via Python-list <python-list@python.org> wrote:
>>
>> I've always like writing using the "or" form and have never gotten bit
> 
> I, on the other hand, had to fix a production problem that using “or” introducted.
> I avoid this idiom because it fails on falsy values.

As with any other facility, one has to understand ALL implications!

It must be one of those intensely-frustrating errors to track-down, 
which is then oh-so-simple to fix!

Are you able to list (real, if suitably anonymised) examples of where 
the truthy/falsy was inappropriate, please?

-- 
Regards,
=dn