diff options
author | Mark Shannon <mark@hotpy.org> | 2024-10-29 11:15:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-29 11:15:42 +0000 |
commit | faa3272fb8d63d481a136cc0467a0cba6ed7b264 (patch) | |
tree | 474ac9edbff637a8edb280846a1d3d9b113915c4 /Lib/test/test_code.py | |
parent | 67f5c5bd6fcc956a785edef3be67e8cbe470cd31 (diff) | |
download | cpython-faa3272fb8d63d481a136cc0467a0cba6ed7b264.tar.gz cpython-faa3272fb8d63d481a136cc0467a0cba6ed7b264.zip |
GH-125837: Split `LOAD_CONST` into three. (GH-125972)
* Add LOAD_CONST_IMMORTAL opcode
* Add LOAD_SMALL_INT opcode
* Remove RETURN_CONST opcode
Diffstat (limited to 'Lib/test/test_code.py')
-rw-r--r-- | Lib/test/test_code.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py index 93f3a5833cb..dcdd15a43e6 100644 --- a/Lib/test/test_code.py +++ b/Lib/test/test_code.py @@ -254,10 +254,11 @@ class CodeTest(unittest.TestCase): return x code = func.__code__ - # different co_name, co_varnames, co_consts + # Different co_name, co_varnames, co_consts. + # Must have the same number of constants and + # variables or we get crashes. def func2(): y = 2 - z = 3 return y code2 = func2.__code__ |