There was an error while loading. Please reload this page.
1 parent 4347b13 commit c199564Copy full SHA for c199564
2 files changed
Lib/test/test_code.py
@@ -966,6 +966,9 @@ def func_with_globals_and_builtins():
966
return callable(mod2), tuple(mods), list(mods), checks
967
968
func = func_with_globals_and_builtins
969
+ dis.dis(func)
970
+ for i, instr in enumerate(dis.get_instructions(func)):
971
+ print(i, instr, end='')
972
with self.subTest(f'{func} code'):
973
expected = new_var_counts(
974
purelocals=4,
Objects/codeobject.c
@@ -1730,6 +1730,8 @@ identify_unbound_names(PyThreadState *tstate, PyCodeObject *co,
1730
assert(counts == NULL || counts->total == 0);
1731
struct co_unbound_counts unbound = {0};
1732
Py_ssize_t len = Py_SIZE(co);
1733
+fprintf(stderr, "\n");
1734
+fprintf(stderr, "%s\n", PyUnicode_AsUTF8(co->co_name));
1735
for (int i = 0; i < len; i++) {
1736
fprintf(stderr, "%d\n", i);
1737
fflush(stderr);
0 commit comments