Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Doc/whatsnew/3.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ Other Language Changes
is ``-1``, and a suitable power of that inverse for other negative exponents.
(Contributed by Mark Dickinson in :issue:`36027`.)

* When dictionary comprehensions are evaluated, the key is now evaluated before
Comment thread
pablogsal marked this conversation as resolved.
the value, as proposed by :pep:`572`.


New Modules
===========
Expand Down Expand Up @@ -1502,6 +1505,11 @@ CPython bytecode changes
when awaiting a next item in an :keyword:`async for` loop.
(Contributed by Serhiy Storchaka in :issue:`33041`.)

* The :opcode:`MAP_ADD` now expects the value as the first element in the
stack and the key as the second element. This change was made so the key
is always evaluated before the value in dictionary comprehensions, as
porposed by :pep:`572`. (Contributed by Jörn Heissler in :issue:`35224`.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

porposed -> proposed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #14371



Demos and Tools
---------------
Expand Down