[Python-ideas] [Python-Dev] What's the status of PEP 505: None-aware operators?

electronnn at gmail.com electronnn at gmail.com
Wed Nov 29 21:48:04 EST 2017

I, too, think that this is too special a case for a dedicated syntax but so
far I prefer:

  x None-or y

The meaning is more clear to me. None-or is like regular or except that y
is evaluated only if x is None.

On Thu, Nov 30, 2017 at 2:35 AM, MRAB <python at mrabarnett.plus.com> wrote:

> On 2017-11-29 21:27, Greg Ewing wrote:
>> Nick Coghlan wrote:
>> What about more English-like syntax:
>>>> X or else Y
>>> The problem with constructs like this is that they look like they
>>> should mean the same thing as "X or Y".
>> How about:
>>      x otherwise y
>> It looks different enough from "or" that you're not going
>> to accidentally read it that way when skimming.
>> The meaning is something you'll have to learn if you don't
>> know, but at least it's a word that can be googled for.
>> It has the disadvantage that it's quite long. How about "alt"
> (abbreviation for "alternatively"):
>     x alt y
> _______________________________________________
> 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20171130/6b6cb3a6/attachment.html>

More information about the Python-ideas mailing list