[Python-ideas] [Python-Dev] What's the status of PEP 505: None-aware operators?
Serhiy Storchaka
storchaka at gmail.com
Wed Nov 29 08:11:12 EST 2017
29.11.17 15:01, Stephan Houben пише:
> 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
This look the most "natural" to me. I.e. the least "unnatural". If we
even will introduce a new special syntax I will prefer this syntax.
The only disadvantage is that this will prevent introducing "angular
parenthesis" in future: A if <X, Y, Z> == B else C.
More information about the Python-ideas
mailing list