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

Stephan Houben stephanh42 at gmail.com
Wed Nov 29 08:01:12 EST 2017


What about a more general:

A if <binary_relation> B else C

which would allow

A if is not None else C

but also e.g.

A if >= 1 else 0

Stephan

Op 29 nov. 2017 13:41 schreef "Nick Coghlan" <ncoghlan at gmail.com>:

> On 29 November 2017 at 22:38, Stephan Houben <stephanh42 at gmail.com> 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".
>
> Cheers,
> Nick.
>
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20171129/7e04a758/attachment.html>


More information about the Python-ideas mailing list