summaryrefslogtreecommitdiff
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-05-07 15:19:19 +0100
committerGitHub <noreply@github.com>2021-05-07 15:19:19 +0100
commitadcd2205565f91c6719f4141ab4e1da6d7086126 (patch)
tree0953b285944eccde57b05b8f3c7e30fb501a3d64 /Lib/test/test_exceptions.py
parentb32c8e97951db46484ba3b646b988bcdc4062199 (diff)
downloadcpython-git-adcd2205565f91c6719f4141ab4e1da6d7086126.tar.gz
bpo-40222: "Zero cost" exception handling (GH-25729)
"Zero cost" exception handling. * Uses a lookup table to determine how to handle exceptions. * Removes SETUP_FINALLY and POP_TOP block instructions, eliminating (most of) the runtime overhead of try statements. * Reduces the size of the frame object by about 60%.
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 3c427fed56..1fe479fbe8 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -218,7 +218,7 @@ class ExceptionTests(unittest.TestCase):
check('class foo:return 1', 1, 11)
check('def f():\n continue', 2, 3)
check('def f():\n break', 2, 3)
- check('try:\n pass\nexcept:\n pass\nexcept ValueError:\n pass', 2, 3)
+ check('try:\n pass\nexcept:\n pass\nexcept ValueError:\n pass', 3, 1)
# Errors thrown by tokenizer.c
check('(0x+1)', 1, 3)