True == 1 weirdness

Mark Lawrence breamoreboy at yahoo.co.uk
Wed Sep 16 22:22:51 CEST 2015


On 16/09/2015 18:41, Emile van Sebille wrote:
> 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
>

You're replying to a typo, it should have been "==" not "=".

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence



More information about the Python-list mailing list