the bytecode of print('Hello') in Python 3.5 NEED Contributions if you want to help me TODO list: Compatible with Python 2.7, 3.3, 3.4, 3.6 and futures versions Generate a XML, JSON, Dict Library with Clean API GUI (TK ?) github.com/matrixise/dumpyc 53 / 94
y + 3 # <--- (3) ... and the interpreter is here. ... return z ... >>> def foo(): ... a = 1 ... b = 2 ... return a + bar(b) # <--- (2) ... which is returning a call to bar ... ... >>> foo() # <--- (1) We're in the middle of a call to foo ... 3 59 / 94
STORE_NAME(namei) : Implements name=TOS.namei is the index of the name in the attribute co_names of the code object. TARGET(STORE_NAME) { PyObject *name = GETITEM(names, oparg); PyObject *v = POP(); PyObject *ns = f->f_locals; int err; if (ns == NULL) { PyErr_Format(PyExc_SystemError, "no locals found when storing %R", name); Py_DECREF(v); goto error; } if (PyDict_CheckExact(ns)) err = PyDict_SetItem(ns, name, v); else err = PyObject_SetItem(ns, name, v); Py_DECREF(v); if (err != 0) goto error; DISPATCH(); } 73 / 94