Skip to content

Commit

Permalink
Issue 35224: Add PEP 572 (assignment expressions) to What's New (pyth…
Browse files Browse the repository at this point in the history
…on#12941)

This is meant as a stub, during the PyCon sprints we can iterate.
  • Loading branch information
gvanrossum authored Apr 24, 2019
1 parent 4312522 commit 09d434c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Doc/whatsnew/3.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------------------------------------------

Expand Down

0 comments on commit 09d434c

Please sign in to comment.