summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-06-04 10:15:57 (GMT)
committerGeorg Brandl <georg@python.org>2009-06-04 10:15:57 (GMT)
commit3a5971c237f15617a49546dec7729177d9c7067b (patch)
tree7352355786d5866ee585f749c10232bd95404f2a /Doc
parent46121e79cedce6a6daba9ebd39d7ff345f3f15b7 (diff)
downloadcpython-3a5971c237f15617a49546dec7729177d9c7067b.zip
cpython-3a5971c237f15617a49546dec7729177d9c7067b.tar.gz
cpython-3a5971c237f15617a49546dec7729177d9c7067b.tar.bz2
#5967: note that the C slicing APIs do not support negative indices.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/list.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/c-api/list.rst b/Doc/c-api/list.rst
index 2ce5ade..ebbab13 100644
--- a/Doc/c-api/list.rst
+++ b/Doc/c-api/list.rst
@@ -149,9 +149,10 @@ List Objects
.. cfunction:: PyObject* PyList_GetSlice(PyObject *list, Py_ssize_t low, Py_ssize_t high)
- Return a list of the objects in *list* containing the objects *between*
- *low* and *high*. Return *NULL* and set an exception if unsuccessful.
- Analogous to ``list[low:high]``.
+ Return a list of the objects in *list* containing the objects *between* *low*
+ and *high*. Return *NULL* and set an exception if unsuccessful. Analogous
+ to ``list[low:high]``. Negative indices, as when slicing from Python, are not
+ supported.
.. versionchanged:: 2.5
This function used an :ctype:`int` for *low* and *high*. This might
@@ -163,7 +164,8 @@ List Objects
Set the slice of *list* between *low* and *high* to the contents of
*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may
be *NULL*, indicating the assignment of an empty list (slice deletion).
- Return ``0`` on success, ``-1`` on failure.
+ Return ``0`` on success, ``-1`` on failure. Negative indices, as when
+ slicing from Python, are not supported.
.. versionchanged:: 2.5
This function used an :ctype:`int` for *low* and *high*. This might