[issue17387] Error in C API documentation of PySequenceMethods
New submission from Alex Orange:
The documentation at http://docs.python.org/2/c-api/typeobj.html#PySequenceMethods is missing sq_slice between sq_item and sq_ass_item. This will mess up anyone trying to use anything after sq_item (that isn't using designated initializers).
----------
assignee: docs@python
components: Documentation
messages: 183779
nosy: Alex.Orange, docs@python
priority: normal
severity: normal
status: open
title: Error in C API documentation of PySequenceMethods
versions: Python 2.7
_______________________________________
Python tracker
Changes by Mike Hoy
Mike Hoy added the comment:
Looking through Include/object.h I see that sq_slice is now:
void *was_sq_slice. Can anyone provide any clarification as to where I can find info about sq_slice?
----------
_______________________________________
Python tracker
Alex Orange added the comment:
If you look at the 2.7.3 version of that file: http://hg.python.org/cpython/file/70274d53c1dd/Include/object.h it has more information. It is a ssizessizeargfunc. I assume it passes the lower and upper bound and expects back a subsequence.
----------
_______________________________________
Python tracker
Alex Orange added the comment:
Just to clarify though, that is entirely an assumption as to how it's supposed to be used.
----------
_______________________________________
Python tracker
Changes by Jesús Cea Avión
Mike Hoy added the comment:
I was looking at 3.4 files. You're right it is in 2.7. Guess you have all the info you need to make a patch for it then?
ssizessizeargfunc PySequenceMethods.sq_slice
It passes the lower and upper bound and expects back a subsequence.
Or is there more to it than that? I cannot for the life of me make any sense out of it. Here I was sitting looking at this thinking it would be very easy doc fix for me but in the end I think I'll bow out.
----------
_______________________________________
Python tracker
Changes by Ezio Melotti
Alex Orange added the comment:
I must admit I'm a little new to the development side of things. Can someone point me at a repo or something that the documentation files are in? I'm sort of guessing that the html is the processed output of something.
----------
_______________________________________
Python tracker
Ezio Melotti added the comment:
See http://docs.python.org/devguide/ and the Doc/c-api dir in the CPython repo.
----------
_______________________________________
Python tracker
Serhiy Storchaka
participants (5)
-
Alex Orange
-
Ezio Melotti
-
Jesús Cea Avión
-
Mike Hoy
-
Serhiy Storchaka