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

Guido van Rossum guido at python.org
Mon Sep 28 22:32:06 CEST 2015


On Mon, Sep 28, 2015 at 1:27 PM, Ben Finney <ben+python at benfinney.id.au>
wrote:

> Carl Meyer <carl at oddbird.net> writes:
>
> > On 09/28/2015 01:53 PM, Guido van Rossum wrote:
> > > On Mon, Sep 28, 2015 at 12:43 PM, Carl Meyer:
> > > > I'm having trouble coming up with a parallel example where the
> > > > existing short-circuit operators break "extractibility" of a
> > > > sub-expression like that.
> > >
> > > Why is that an interesting property?
> >
> > Because breaking up an overly-complex expression into smaller
> > expressions by means of extracting sub-expressions into temporary
> > variables is a common programming task
>
> +1, this is a hugely important tool in the mental toolkit. Making that
> more difficult is a high cost, thank you for expressing it so explicitly.
>
> > it's usually one that can be handled pretty mechanically according to
> > precedence rules, without having to consider that some operators might
> > have action-at-a-distance beyond their precedence.
> >
> > > I don't know, but I think you shouldn't worry about this.
> >
> > I think it's kind of odd, but if nobody else is worried about it, I
> > won't worry about it either :-)
>
> I share the concerns Carl is expressing; action-at-a-distance is
> something I'm glad Python doesn't have much of, and I would be loath to
> see that increase.
>

Really? You would consider a syntactic feature whose scope is limited to
things to its immediate right with the most tightly binding
pseudo-operators "action-at-a-distance"? The rhetoric around this issue is
beginning to sound ridiculous.

-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150928/dda8ccd9/attachment.html>


More information about the Python-ideas mailing list