summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2019-04-24 18:30:17 (GMT)
committerGitHub <noreply@github.com>2019-04-24 18:30:17 (GMT)
commit09d434caa2c01477ea2ccc3e9b88e9faa0107c61 (patch)
tree244e41222900904a9336db04fb320d7daba08225
parent43125224d6da5febb34101ebfd36536d791d68cd (diff)
downloadcpython-09d434caa2c01477ea2ccc3e9b88e9faa0107c61.zip
cpython-09d434caa2c01477ea2ccc3e9b88e9faa0107c61.tar.gz
cpython-09d434caa2c01477ea2ccc3e9b88e9faa0107c61.tar.bz2
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.
-rw-r--r--Doc/whatsnew/3.8.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index bd7ad3f..ae8163a 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -67,6 +67,22 @@ Summary -- Release highlights
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
-----------------------------------------------------