True == 1 weirdness

Ian Kelly ian.g.kelly at gmail.com
Wed Sep 16 19:55:34 CEST 2015


On Wed, Sep 16, 2015 at 11:44 AM, Grant Edwards <invalid at invalid.invalid> wrote:
> On 2015-09-16, Steven D'Aprano <steve at pearwood.info> wrote:
>> On Thu, 17 Sep 2015 03: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"
>>
>> [...]
>>> I'm not all that sure A and B should be allowed.
>>
>> You can take `x == y == z` off me when you pry it from my cold, dead hands.
>
> Well, that case hadn't been mentioned yet. But, I agree that should be
> added as case E and be allowed.

It was mentioned as case A, albeit mistakenly using "=" (which isn't
even a comparison operator) instead of "==".


More information about the Python-list mailing list