Configuring an object via a dictionary
dn
PythonList at DancesWithMice.info
Sat Mar 16 17:19:10 EDT 2024
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 at 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
More information about the Python-list
mailing list