On Mon, Oct 29, 2012 at 12:00 PM, Andrew Robinson
<andr...@r3dsolutions.com> wrote:
> I downloaded the source code for python 3.3.0, as the tbz;
> In the directory "Python-3.3.0/Python", look at Python-ast.c, line 2089 &
> ff.

Python-ast.c is part of the compiler code.  That's not the struct used
to represent the object at runtime, but the struct used to represent
the AST node while compiling.

For the runtime definition of slices, look at sliceobject.h and
sliceobject.c.  Slices are represented as:

typedef struct {
    PyObject_HEAD
    PyObject *start, *stop, *step;      /* not NULL */
} PySliceObject;

"PyObject_HEAD" is a macro that incorporates the object type pointer
and the reference count.  Hence, 5 words.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to