Add `co_names` to `PyCode` by jopemachine · Pull Request #4177 · RustPython/RustPython
I updated the test_code.py, but there are some points that I'd like to mention.
- Updated
opcode.pyfor updatingtest_code.py. but I didn't updatetest_opcode.pybecause the test code is not changed. - There are some
dumpfunction calls in the above comment of thetest_code.py. Because this raised test failure, I commented it out and addedTODO: RUSTPYTHONcomment on top of each function call. - I checked the added
co_namesmanually in the dump calls, the first dump call's actual result is different from the expected result. The actual result is('__doc__')while the expected result is empty tuple, the remaining test results are correct. - The updated
opcode.pycontainsdef_op('YIELD_FROM', 72)line which not exist in the cpython anymore. I included the line because it is used incoroutines.py. This needs to be removed after thecoroutines.pyfile is updated.