mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
gh-101632: Add the new RETURN_CONST opcode (#101633)
This commit is contained in:
parent
0d3d5007b1
commit
753fc8a5d6
19 changed files with 186 additions and 154 deletions
|
|
@ -1900,7 +1900,7 @@ class ConstantTests(unittest.TestCase):
|
|||
co = compile(tree, '<string>', 'exec')
|
||||
consts = []
|
||||
for instr in dis.get_instructions(co):
|
||||
if instr.opname == 'LOAD_CONST':
|
||||
if instr.opname == 'LOAD_CONST' or instr.opname == 'RETURN_CONST':
|
||||
consts.append(instr.argval)
|
||||
return consts
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue