[Python-ideas] Null coalescing operator
Guido van Rossum
gvanrossum at gmail.com
Tue Nov 1 23:59:59 EDT 2016
Geez.
--Guido (mobile)
On Nov 1, 2016 8:10 PM, "Chris Angelico" <rosuav at gmail.com> wrote:
> On Wed, Nov 2, 2016 at 11:09 AM, Steven D'Aprano <steve at pearwood.info>
> wrote:
> > I don't know when I would ever want to actually do this in practice, but
> > allowing the ?. operator to magically effect code outside of the
> > parentheses definitely counts as "spooky action at a distance". Guido's
> > rule of "everything to the right" is easy to reason about if "to the
> > right" ends where the parenthised expression ends.
> >
>
> We already expect "to the left" and "to the right" to end based on
> operator precedence rules. Parentheses are used to control operator
> precedence. It would surprise people *greatly* if they didn't bound
> the effect of the question mark.
>
> ChrisA
> _______________________________________________
> 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/20161101/8435725c/attachment.html>
More information about the Python-ideas
mailing list