diff options
author | Jörn Heissler <joernheissler@users.noreply.github.com> | 2019-06-22 14:40:55 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-22 14:40:55 (GMT) |
commit | c8a35417db8853a253517a3e5190e174075c6384 (patch) | |
tree | 760e1a6590e7244315d4c8ac35acc8a0a6f6b736 /Doc/library/dis.rst | |
parent | bb110cc2ed81447fb48805f31146cf31323a8fc3 (diff) | |
download | cpython-c8a35417db8853a253517a3e5190e174075c6384.zip cpython-c8a35417db8853a253517a3e5190e174075c6384.tar.gz cpython-c8a35417db8853a253517a3e5190e174075c6384.tar.bz2 |
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
Diffstat (limited to 'Doc/library/dis.rst')
-rw-r--r-- | Doc/library/dis.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 5b79be6..39a3e13 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -645,10 +645,12 @@ the original TOS1. .. opcode:: MAP_ADD (i) - Calls ``dict.setitem(TOS1[-i], TOS, TOS1)``. Used to implement dict + Calls ``dict.__setitem__(TOS1[-i], TOS1, TOS)``. Used to implement dict comprehensions. .. versionadded:: 3.1 + .. versionchanged:: 3.8 + Map value is TOS and map key is TOS1. Before, those were reversed. For all of the :opcode:`SET_ADD`, :opcode:`LIST_APPEND` and :opcode:`MAP_ADD` instructions, while the added value or key/value pair is popped off, the |