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" <[email protected]>:

> On 29 November 2017 at 22:38, Stephan Houben <[email protected]> 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   |   [email protected]   |   Brisbane, Australia
>
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to