Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The C API function PyCode_New is (minimally) documented here: <a href="http://docs.python.org/c-api/code.html" rel="noreferrer">http://docs.python.org/c-api/code.html</a> ­— the C source code of this function (Python 2.7) is here: <a href="http://hg.python.org/cpython/file/b5ac5e25d506/Objects/codeobject.c#l43" rel="noreferrer">http://hg.python.org/cpython/file/b5ac5e25d506/Objects/codeobject.c#l43</a></p> <pre><code>PyCodeObject * PyCode_New(int argcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *lnotab) </code></pre> <p>However, in the Python constructor, the last six arguments appear to be swapped around a little. This is the C code that extracts the arguments passed in by Python: <a href="http://hg.python.org/cpython/file/b5ac5e25d506/Objects/codeobject.c#l247" rel="noreferrer">http://hg.python.org/cpython/file/b5ac5e25d506/Objects/codeobject.c#l247</a></p> <pre><code>if (!PyArg_ParseTuple(args, "iiiiSO!O!O!SSiS|O!O!:code", &amp;argcount, &amp;nlocals, &amp;stacksize, &amp;flags, &amp;code, &amp;PyTuple_Type, &amp;consts, &amp;PyTuple_Type, &amp;names, &amp;PyTuple_Type, &amp;varnames, &amp;filename, &amp;name, &amp;firstlineno, &amp;lnotab, &amp;PyTuple_Type, &amp;freevars, &amp;PyTuple_Type, &amp;cellvars)) return NULL; </code></pre> <p>Pythonized: </p> <pre><code>def __init__(self, argcount, nlocals, stacksize, flags, code, consts, names, varnames, filename, name, firstlineno, lnotab, freevars=None, cellvars=None): # ... </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload