New submission from Lorenz Quack <d...@amberfisharts.com>: 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 ---------- assignee: georg.brandl components: Documentation messages: 96141 nosy: donlorenzo, georg.brandl severity: normal status: open title: extended slicing not sufficiently covered in docs type: feature request versions: Python 3.0, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7460> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com