True == 1 weirdness

Emile van Sebille emile at fenx.com
Wed Sep 16 19:41:08 CEST 2015


On 9/16/2015 10:27 AM, Grant Edwards wrote:
> On 2015-09-16, Sven R. Kunze <srkunze at mail.de> wrote:
>> 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 <
>>
<snip>

> I'm not all that sure A and B should be allowed.

I find A convenient for initializing:

aname = bname = cname = None

Nut I don't recall ever having used is this way.

Emile



More information about the Python-list mailing list