[Python-ideas] PEP 505 (None coalescing operators) thoughts
Ryan Gonzalez
rymg19 at gmail.com
Thu Oct 1 04:30:02 CEST 2015
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:
>> On 30.09.2015 13:00, Rob Cliffe wrote:
>>> Or:
>>> x = a orelse b # Visual Basic has a short-circuiting
>>> OrElse operator for boolean operands
>>> x = a orifNone b
>>>
>>>
>>> On 30/09/2015 01:39, Ryan Gonzalez wrote:
>>>> What about 'otherwise'?
>>>>
>>>> x = a otherwise b
>>>>
>>
>>
>> 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...
>>
>>
>> _______________________________________________
>> Python-ideas mailing list
>> Python-ideas at python.org
>> https://mail.python.org/mailman/listinfo/python-ideas
>> Code of Conduct: http://python.org/psf/codeofconduct/
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Python-ideas mailing list
>Python-ideas at python.org
>https://mail.python.org/mailman/listinfo/python-ideas
>Code of Conduct: http://python.org/psf/codeofconduct/
--
Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.
More information about the Python-ideas
mailing list