Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Negative array indicies and slice()
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Ian Kelly, post: 5058070"] 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. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Negative array indicies and slice()
Top