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
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to