True == 1 weirdness

Sven R. Kunze srkunze at mail.de
Wed Sep 16 19:23:55 CEST 2015


On 16.09.2015 18:57, Random832 wrote:
> I think that chaining should be limited to:
>
> A) all operators are "="
> B) all operators are "is"
> C) all operators are either >= or >
> D) all operators are either <= or <

That certainly would be a fine guideline. Only use it with all operators 
the same.

Everything else might cause headaches.

Restricting it language-wise? I don't know. I have to admit I've never 
seen this in production anyway. Most languages I see people working with 
don't have this feature at all. So, they don't know it exists in Python.

Best,
Sven


More information about the Python-list mailing list