]> granicus.if.org Git - python/commitdiff
PySequence_Fast generally returns a list not a tuple (closes #16395)
authorBenjamin Peterson <benjamin@python.org>
Tue, 8 Apr 2014 14:48:36 +0000 (10:48 -0400)
committerBenjamin Peterson <benjamin@python.org>
Tue, 8 Apr 2014 14:48:36 +0000 (10:48 -0400)
Doc/c-api/sequence.rst

index 2b668a5d3d44309fc20f7ee20967bea891ce2bce..653f9ad0362694b6517c497cae970f3a8f9d13ba 100644 (file)
@@ -167,10 +167,10 @@ Sequence Protocol
 
 .. c:function:: PyObject* PySequence_Fast(PyObject *o, const char *m)
 
-   Returns the sequence *o* as a tuple, unless it is already a tuple or list, in
-   which case *o* is returned.  Use :c:func:`PySequence_Fast_GET_ITEM` to access the
-   members of the result.  Returns *NULL* on failure.  If the object is not a
-   sequence, raises :exc:`TypeError` with *m* as the message text.
+   Return the sequence *o* as a list, unless it is already a tuple or list, in
+   which case *o* is returned.  Use :c:func:`PySequence_Fast_GET_ITEM` to access
+   the members of the result.  Returns *NULL* on failure.  If the object is not
+   sequence, raises :exc:`TypeError` with *m* as the message text.
 
 
 .. c:function:: PyObject* PySequence_Fast_GET_ITEM(PyObject *o, Py_ssize_t i)