bpo-35224: Reverse evaluation order of key: value in dict comprehensions (GH-14139)



… as proposed in PEP 572; key is now evaluated before value.





https://bugs.python.org/issue35224
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index 8b71106..432327a 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -337,6 +337,12 @@
 datum (textually rightmost in the display) stored for a given key value
 prevails.
 
+.. versionchanged:: 3.8
+   Prior to Python 3.8, in dict comprehensions, the evaluation order of key
+   and value was not well-defined.  In CPython, the value was evaluated before
+   the key.  Starting with 3.8, the key is evaluated before the value, as
+   proposed by :pep:`572`.
+
 
 .. _genexpr: