[Python-checkins] r73213 - python/trunk/Doc/c-api/list.rst

georg.brandl python-checkins at python.org
Thu Jun 4 12:15:57 CEST 2009


Author: georg.brandl
Date: Thu Jun  4 12:15:57 2009
New Revision: 73213

Log:
#5967: note that the C slicing APIs do not support negative indices.

Modified:
   python/trunk/Doc/c-api/list.rst

Modified: python/trunk/Doc/c-api/list.rst
==============================================================================
--- python/trunk/Doc/c-api/list.rst	(original)
+++ python/trunk/Doc/c-api/list.rst	Thu Jun  4 12:15:57 2009
@@ -149,9 +149,10 @@
 
 .. 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 @@
    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


More information about the Python-checkins mailing list