[Python-checkins] cpython (2.7): PySequence_Fast generally returns a list not a tuple (closes #16395)

benjamin.peterson python-checkins at python.org
Tue Apr 8 16:49:19 CEST 2014


http://hg.python.org/cpython/rev/b235db467cd5
changeset:   90176:b235db467cd5
branch:      2.7
parent:      90173:41dbabb7d383
user:        Benjamin Peterson <benjamin at python.org>
date:        Tue Apr 08 10:48:36 2014 -0400
summary:
  PySequence_Fast generally returns a list not a tuple (closes #16395)

files:
  Doc/c-api/sequence.rst |  8 ++++----
  1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/Doc/c-api/sequence.rst b/Doc/c-api/sequence.rst
--- a/Doc/c-api/sequence.rst
+++ b/Doc/c-api/sequence.rst
@@ -167,10 +167,10 @@
 
 .. 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
+   a sequence, raises :exc:`TypeError` with *m* as the message text.
 
 
 .. c:function:: PyObject* PySequence_Fast_GET_ITEM(PyObject *o, Py_ssize_t i)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list