[Python-Dev] PEP 572: Assignment Expressions

Chris Jerdonek chris.jerdonek at gmail.com
Tue Apr 17 04:26:46 EDT 2018


On Tue, Apr 17, 2018 at 12:46 AM, Chris Angelico <rosuav at gmail.com> wrote:
>
> Having survived four rounds in the boxing ring at python-ideas, PEP
> 572 is now ready to enter the arena of python-dev. I'll let the
> proposal speak for itself. Be aware that the reference implementation
> currently has a few test failures, which I'm still working on, but to
> my knowledge nothing will prevent the proposal itself from being
> successfully implemented.

Very interesting / exciting, thanks!

> Augmented assignment is not supported in expression form::
>
>     >>> x +:= 1
>       File "<stdin>", line 1
>         x +:= 1
>             ^
>     SyntaxError: invalid syntax

Can you include in the PEP a brief rationale for not accepting this
form? In particular, is the intent never to support it, or is the
intent to expressly allow adding it at a later date (e.g. after
getting experience with the simpler form, etc)?

--Chris


More information about the Python-Dev mailing list