This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Error in C API documentation of PySequenceMethods
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: docs@python Nosy List: benjamin.peterson, crazycasta, docs@python, ezio.melotti, jcea, mikehoy, serhiy.storchaka
Priority: normal Keywords:

Created on 2013-03-09 00:58 by crazycasta, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
msg183779 - (view) Author: Alex Orange (crazycasta) Date: 2013-03-09 00:58
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).
msg183795 - (view) Author: Mike Hoy (mikehoy) * Date: 2013-03-09 04:21
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?
msg183797 - (view) Author: Alex Orange (crazycasta) Date: 2013-03-09 04:44
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.
msg183798 - (view) Author: Alex Orange (crazycasta) Date: 2013-03-09 04:45
Just to clarify though, that is entirely an assumption as to how it's supposed to be used.
msg183866 - (view) Author: Mike Hoy (mikehoy) * Date: 2013-03-10 03:39
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.
msg184065 - (view) Author: Alex Orange (crazycasta) Date: 2013-03-13 01:27
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.
msg184066 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-03-13 02:14
See http://docs.python.org/devguide/ and the Doc/c-api dir in the CPython repo.
msg370433 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-05-31 12:53
Python 2.7 is no longer supported.
History
Date User Action Args
2022-04-11 14:57:42adminsetgithub: 61589
2020-05-31 12:53:21serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg370433

resolution: out of date
stage: needs patch -> resolved
2013-03-13 02:14:58ezio.melottisetmessages: + msg184066
2013-03-13 01:27:30crazycastasetmessages: + msg184065
2013-03-12 04:16:07ezio.melottisetnosy: + benjamin.peterson, ezio.melotti

type: enhancement
stage: needs patch
2013-03-10 03:39:41mikehoysetmessages: + msg183866
2013-03-10 02:20:18jceasetnosy: + jcea
2013-03-09 04:45:01crazycastasetmessages: + msg183798
2013-03-09 04:44:21crazycastasetmessages: + msg183797
2013-03-09 04:21:42mikehoysetmessages: + msg183795
2013-03-09 03:35:55mikehoysetnosy: + mikehoy
2013-03-09 00:58:30crazycastacreate