[Python-Dev] Accepting PEP 572, Assignment Expressions

Chris Jerdonek chris.jerdonek at gmail.com
Thu Jul 12 06:06:32 EDT 2018


(status := "Accepted") and "Congratulations!" ;-) (hope I did that right,
but I can't try it yet!)

Thanks for hanging in there, Guido, and for your patience with everyone
during the discussions. I'm glad you're still with us!

--Chris



On Wed, Jul 11, 2018 at 5:10 PM, Guido van Rossum <guido at python.org> wrote:

> As anticippated, after a final round of feedback I am hereby accepting PEP
> 572, Assignment Expressions: https://www.python.org/dev/peps/pep-0572/
>
> Thanks to everyone who participated in the discussion or sent a PR.
>
> Below is a list of changes since the last post (
> https://mail.python.org/pipermail/python-dev/2018-July/154557.html) --
> they are mostly cosmetic so I won't post the doc again, but if you want to
> go over them in detail, here's the history of the file on GitHub:
> https://github.com/python/peps/commits/master/pep-0572.rst, and here's a
> diff since the last posting: https://github.com/python/peps
> /compare/26e6f61f...master (sadly it's repo-wide -- you can click on
> Files changed and then navigate to pep-0572.rst).
>
>    - Tweaked the example at line 95-100 to use result = ... rather than return
>    ... so as to make a different rewrite less feasible
>    - Replaced the weak "2-arg iter" example with Giampaolo Roloda's while
>    chunk := file.read(8192): process(chunk)
>    - *Added prohibition of unparenthesized assignment expressions in
>    annotations and lambdas*
>    - Clarified that TargetScopeError is a *new* subclass of SyntaxError
>    - Clarified the text forbidding assignment to comprehension loop
>    control variables
>    - Clarified that the prohibition on := with annotation applies to
>    *inline* annotation (i.e. they cannot be syntactically combined in the
>    same expression)
>    - Added conditional expressions to the things := binds less tightly
>    than
>    - Dropped section "This could be used to create ugly code"
>    - Clarified the example in Appendix C
>
> Now on to the implementation work! (Maybe I'll sprint on this at the
> core-dev sprint in September.)
>
> --
> --Guido van Rossum (python.org/~guido)
>
> _______________________________________________
> 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/
> chris.jerdonek%40gmail.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20180712/9a17e7c0/attachment.html>


More information about the Python-Dev mailing list