[Python-ideas] Fwd: PEP 505: None-aware operators

Paul Moore p.f.moore at gmail.com
Sun Jul 22 07:09:40 EDT 2018

Aargh, I hate Google Groups with a vengeance. If people *have* to post
from there, can they please change reply-to so that replies don't get
messed up. Or is that not possible, and yet another way that GG is
just broken?

---------- Forwarded message ----------
From: Paul Moore <p.f.moore at gmail.com>
Date: 22 July 2018 at 12:05
Subject: Re: [Python-ideas] PEP 505: None-aware operators
To: Grégory Lielens <gregory.lielens at gmail.com>
Cc: python-ideas <python-ideas at googlegroups.com>

On 22 July 2018 at 11:54, Grégory Lielens <gregory.lielens at gmail.com> wrote:
> Except that the third possibility is not possible...if a is None, a[2] will throw an exception...
> For now at least ;-)

Doh. True, I should have said "If a is not None and a[2] is not None, use a[2]".

But my point about unintended behaviour if a[2] is None stands. And
the wider point that these operators are hard to reason correctly
about is probably emphasised by my mistake.


More information about the Python-ideas mailing list