You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
co_code: bytes (only useful if the bytecode is cpython compatible)
co_lnotab: bytes (line number <-> byte code index)
Maybe it does not make sense to implement the last two or three items (as far as I know the bytecode is not cpython compatible?). But the other ones can be implemented, I think.
I wish I'd be able to do that, but the only language I really speak is python 😞.
Feature
code
objects do not have the following attributesco_varnames: typing.Tuple[str, ...]
(see this issue, Add json output for CPython tests #1834)co_names: typing.Tuple[str, ...]
Addco_names
toPyCode
#4177co_cellvars: typing.Tuple[str, ...]
Add co_cellvars to code object #4507co_freevars: typing.Tuple[str, ...]
Add co_freevars to code object #4509co_nlocals: int
(=len(self.co_varnames)
?) Add co_nlocals to code object #4553co_stacksize: int
Add co_stacksize to code objects #4554co_code: bytes
(only useful if the bytecode is cpython compatible)co_lnotab: bytes
(line number <-> byte code index)Maybe it does not make sense to implement the last two or three items (as far as I know the bytecode is not cpython compatible?). But the other ones can be implemented, I think.
I wish I'd be able to do that, but the only language I really speak is python 😞.
Example
should print
Note that with #1834
f.f_code.co_varnames
is('arg1', 'arg2')
(bar
missing) andbar_func.__code__.co_varnames
is('arg_bar',)
(x_bar
missing).Python Documentation
cpython source code
The text was updated successfully, but these errors were encountered: