Sujet : Re: Configuring an object via a dictionary
De : PythonList (at) *nospam* DancesWithMice.info (dn)
Groupes : comp.lang.pythonDate : 16. Mar 2024, 23:19:10
Autres entêtes
Organisation : DWM
Message-ID : <mailman.104.1710623959.3452.python-list@python.org>
References : 1 2 3
User-Agent : Mozilla Thunderbird
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