Issue 35224: Add PEP 572 (assignment expressions) to What's New (#12941)

This is meant as a stub, during the PyCon sprints we can iterate.
This commit is contained in:
Guido van Rossum 2019-04-24 11:30:17 -07:00 committed by GitHub
parent 43125224d6
commit 09d434caa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,6 +67,22 @@ Summary -- Release highlights
New Features New Features
============ ============
Assignment expressions
----------------------
There is new syntax (the "walrus operator", ``:=``) to assign values
to variables as part of an expression. Example::
if (n := len(a)) > 10:
print(f"List is too long ({n} elements, expected <= 10)")
See :pep:`572` for a full description.
(Contributed by Emily Morehouse in :issue:`35224`.)
.. TODO: Emily will sprint on docs at PyCon US 2019.
Parallel filesystem cache for compiled bytecode files Parallel filesystem cache for compiled bytecode files
----------------------------------------------------- -----------------------------------------------------