Issue 7460: extended slicing not sufficiently covered in docs (original) (raw)
Issue7460
Created on 2009-12-08 17:20 by donlorenzo, last changed 2022-04-11 14:56 by admin.
Messages (3) | ||
---|---|---|
msg96141 - (view) | Author: Lorenz Quack (donlorenzo) * | Date: 2009-12-08 17:20 |
I find the documentation regarding extended slicing to be lacking. To be honest I couldn't find any documentation about it. The only - and quite good - source of information I found was [1]. Maybe I didn't search enough. If so I would appreciate a link to the relevant section. In fact I didn't really know about extended slicing (except for the start, stop, step notation) until I implemented a C extension and got a TypeError in Python 3 because I was only supporting simple slicing. And this is despite the fact that I don't consider myself a python n00b. As I am still learning about this protocol at the time of writing. I might have some things backwards and I don't feel qualified to improve the docs myself. Instead I would like to point out where I would have expected some information about this topic: To begin improvement a hint around "PySequence_GetSlice" that this is a more or less deprecated API and "tp_as_mapping->mp_subscript" should be used instead would be useful. In addition "PyObject_GetItem/tp_as_mapping->mp_subscript" could say that a slice object is passed when extended slicing is used. sincerely yours //Lorenz PS: I marked this Python 3.x even though the documentation of 2.x lacks as well because I only got the TypeError in 3.x whereas in 2.x everything works fine with simple slicing. [1] http://mail.python.org/pipermail/python-3000/2007-August/009851.html | ||
msg100501 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2010-03-05 21:46 |
This may be duplicative of #1446619, but I have not looked at that enough. I agree that revision is needed and will try to develop patch suggestions. | ||
msg100503 - (view) | Author: Lorenz Quack (donlorenzo) * | Date: 2010-03-05 22:10 |
When I wrote this bug report I was mainly thinking about the C-API documentation which doesn't mention extended slicing at all. Since the C-API isn't mentioned in the other bug I don't think it's a duplicate but they could maybe be merged if you see any advantage in that. And thanks for looking into it. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:55 | admin | set | github: 51709 |
2020-11-21 16:51:08 | iritkatriel | set | versions: + Python 3.8, Python 3.9, Python 3.10, - Python 3.1, Python 3.2, Python 3.3 |
2011-03-09 03:15:03 | terry.reedy | set | nosy:georg.brandl, terry.reedy, donlorenzoversions: + Python 3.3 |
2010-10-29 10:07:21 | admin | set | assignee: georg.brandl -> docs@python |
2010-03-05 22:10:31 | donlorenzo | set | messages: + |
2010-03-05 21:46:03 | terry.reedy | set | nosy: + terry.reedymessages: + versions: - Python 3.0 |
2009-12-08 17:20:56 | donlorenzo | create |