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.

Author donlorenzo
Recipients donlorenzo, georg.brandl
Date 2009-12-08.17:20:54
SpamBayes Score 2.0894295e-09
Marked as misclassified No
Message-id <1260292857.39.0.569709796057.issue7460@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2009-12-08 17:20:57donlorenzosetrecipients: + donlorenzo, georg.brandl
2009-12-08 17:20:57donlorenzosetmessageid: <1260292857.39.0.569709796057.issue7460@psf.upfronthosting.co.za>
2009-12-08 17:20:56donlorenzolinkissue7460 messages
2009-12-08 17:20:54donlorenzocreate