Commit 96c9a358 authored by Benjamin Peterson's avatar Benjamin Peterson

PySequence_Fast generally returns a list not a tuple (closes #16395)

parent 236d9f8c
...@@ -167,10 +167,10 @@ Sequence Protocol ...@@ -167,10 +167,10 @@ Sequence Protocol
.. c:function:: PyObject* PySequence_Fast(PyObject *o, const char *m) .. 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 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 which case *o* is returned. Use :c:func:`PySequence_Fast_GET_ITEM` to access
members of the result. Returns *NULL* on failure. If the object is not a the members of the result. Returns *NULL* on failure. If the object is not
sequence, raises :exc:`TypeError` with *m* as the message text. a sequence, raises :exc:`TypeError` with *m* as the message text.
.. c:function:: PyObject* PySequence_Fast_GET_ITEM(PyObject *o, Py_ssize_t i) .. c:function:: PyObject* PySequence_Fast_GET_ITEM(PyObject *o, Py_ssize_t i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment