[Python-ideas] PEP 505 (None coalescing operators) thoughts

Bruce Leban bruce at leban.us
Mon Sep 28 23:05:44 CEST 2015


On Mon, Sep 28, 2015 at 1:56 PM, Guido van Rossum <guido at python.org> wrote:

> The rule then is quite simple: each ? does exactly one None check and
> divides the expression into exactly two branches -- one for the case where
> the thing preceding ? is None and one for the case where it isn't.
>

I think this is exactly the right rule (when combined with the previously
stated rule that ?. ?() ?[] have the same precedence as the standard
versions of those operators).

--- Bruce
Check out my new puzzle book: http://J.mp/ingToConclusions
Get it free here: http://J.mp/ingToConclusionsFree (available on iOS)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150928/b98bd596/attachment.html>


More information about the Python-ideas mailing list