[Python-ideas] PEP 505 (None coalescing operators) thoughts
Sven R. Kunze
srkunze at mail.de
Thu Oct 1 19:37:04 CEST 2015
On 01.10.2015 04:30, Ryan Gonzalez wrote:
> On September 30, 2015 9:08:47 PM CDT, Rob Cliffe <rob.cliffe at btinternet.com> wrote:
>> On 30/09/2015 23:57, Sven R. Kunze wrote:
>>>
>>> The only reason why I would prefer "else" over the proposed
>>> alternatives: it's already a reserved keyword and it's not really
>>> necessary to waste another one. Otherwise, I don't care too much.
>>>
>>> Best,
>>> Sven
>> Are you suggesting that "a else b" is a possibility?
>> That's a no-no because
>> a if b else c else d
>> is ambiguous; it could mean either of
>> a if b else (c else d)
>> (a if b else c) else d
>> Rob
>>
> I already said that...
And others already said "use parentheses" if in doubt.
More information about the Python-ideas
mailing list