Open
Description
It would be interesting to have an option in the "Advanced Settings Editor" to show the details that come from dis.code_info
, and display it on the top of the panel (before the bytecode) or in a different JupyterLab widget.
For example:
import dis
code_to_eval = """
a = 2
b = a + 1
"""
code = compile(code_to_eval, '<string>', 'exec')
code_info = dis.code_info(code)
print(code_info)
would output:
Name: <module>
Filename: <string>
Argument count: 0
Kw-only arguments: 0
Number of locals: 0
Stack size: 2
Flags: NOFREE
Constants:
0: 2
1: 1
2: None
Names:
0: a
1: b