summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.11.rst
diff options
context:
space:
mode:
authorBrandt Bucher <brandt@python.org>2021-10-27 09:45:35 (GMT)
committerGitHub <noreply@github.com>2021-10-27 09:45:35 (GMT)
commit82a662e5216a9b3969054c540a759a9493468510 (patch)
tree51bf9b433828dfd6d58f172097cf06202b54df9a /Doc/whatsnew/3.11.rst
parent19a6c41e56f129a67e2a3c96464ba893a97236f7 (diff)
downloadcpython-82a662e5216a9b3969054c540a759a9493468510.zip
cpython-82a662e5216a9b3969054c540a759a9493468510.tar.gz
cpython-82a662e5216a9b3969054c540a759a9493468510.tar.bz2
bpo-44511: Improve the bytecode for class and mapping patterns (GH-26922)
* Refactor mapping patterns and speed up class patterns. * Simplify MATCH_KEYS and MATCH_CLASS. * Add COPY opcode.
Diffstat (limited to 'Doc/whatsnew/3.11.rst')
-rw-r--r--Doc/whatsnew/3.11.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 7b3ce9b..21ad466 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -308,6 +308,16 @@ CPython bytecode changes
fashion as :opcode:`CALL_METHOD`, but also supports keyword arguments. Works
in tandem with :opcode:`LOAD_METHOD`.
+* Removed ``COPY_DICT_WITHOUT_KEYS``.
+
+* :opcode:`MATCH_CLASS` and :opcode:`MATCH_KEYS` no longer push an additional
+ boolean value indicating whether the match succeeded or failed. Instead, they
+ indicate failure with :const:`None` (where a tuple of extracted values would
+ otherwise be).
+
+* Added :opcode:`COPY`, which pushes the *i*-th item to the top of the stack.
+ The item is not removed from its original location.
+
Deprecated
==========