On Thu, 23 Jun 2022 at 10:44, Rob Cliffe via Python-ideas
<python-ideas@python.org> wrote:
>
> Thank you for your proposal David.  At last we have a counter-proposal to 
> talk about.  A few points:
>
> (1) (As I pointed out in an earlier post) There is a flaw in using the syntax 
> of an expression PRECEDED by a SOFT keyword:
>     x     =    later    -y
> With your proposal, x is assigned a deferred-evaluation-object which will be 
> evaluated at some time later as "minus y", right?
> Erm, no.  This is already legal syntax for x being immediately assigned a 
> value of "later minus y".
> If you put the soft keyword *after* the expression:
>     x  =  -y  later
> it may or may not read as well (subjective) but AFAICS would work.
> Alternatively you could propose a hard keyword.  Or a different syntax 
> altogether.

Or just define that the soft keyword applies only if not followed by
an operator. That way, "later -y" would be interpreted the same way it
always has, and if you actually want a deferred of y's negation, you'd
need to spell it some other way. Although I'm not entirely sure how,
since the obvious choice, grouping parentheses, just makes it look
like a function call instead, and "later 0-y" might not have the same
semantics.

ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/5L3AJ3B65ZXNEZWOWTWDTI36DCLETCDV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to