bpo-35224: Add What's new entry for evaluation order in dict comprehensions (GH-14319)
This commit is contained in:
parent
36456df138
commit
b51b7137fa
@ -349,6 +349,9 @@ Other Language Changes
|
|||||||
is ``-1``, and a suitable power of that inverse for other negative exponents.
|
is ``-1``, and a suitable power of that inverse for other negative exponents.
|
||||||
(Contributed by Mark Dickinson in :issue:`36027`.)
|
(Contributed by Mark Dickinson in :issue:`36027`.)
|
||||||
|
|
||||||
|
* When dictionary comprehensions are evaluated, the key is now evaluated before
|
||||||
|
the value, as proposed by :pep:`572`.
|
||||||
|
|
||||||
|
|
||||||
New Modules
|
New Modules
|
||||||
===========
|
===========
|
||||||
@ -1502,6 +1505,11 @@ CPython bytecode changes
|
|||||||
when awaiting a next item in an :keyword:`async for` loop.
|
when awaiting a next item in an :keyword:`async for` loop.
|
||||||
(Contributed by Serhiy Storchaka in :issue:`33041`.)
|
(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`.)
|
||||||
|
|
||||||
|
|
||||||
Demos and Tools
|
Demos and Tools
|
||||||
---------------
|
---------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user