[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] PEP 572: Do we really need a ":" in ":="?

Sorry, I tried this too. If you think the response to the current version
of the PEP is strong, the negative reaction to that version was way
stronger, and I decided not to pursue it.

On Thu, Jul 5, 2018 at 5:00 PM Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:

> On Thu, Jul 5, 2018 at 7:47 PM Yury Selivanov <yselivanov.ml at gmail.com>
> wrote:
>> I think I tried a variation of your proposal here
>> https://mail.python.org/pipermail/python-dev/2018-April/152939.html
>> and nobody really liked it.
>> Right. I now recall your proposal.  I think I did not support it at the
> time because I was against having expressions with side-effects regardless
> of syntax.  Now, as I mentioned, in the current form the PEP makes a strong
> case for allowing a limited form of variable assignment in expressions.  I
> also think that the dreadfulness of mistyping = where == is expected is
> exaggerated.  In all motivating cases, := is used to introduce new bindings
> rather than rebinding existing names.  Automated code checkers can easily
> warn users when they rebind variables in if statements and suggest that
> they silence the warnings with redundant (..) if they really want what they
> wrote.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/guido%40python.org

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