0
0
mirror of https://github.com/python/cpython.git synced 2024-11-24 08:52:25 +01:00

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

This commit is contained in:
Benjamin Peterson 2014-04-08 10:48:36 -04:00
parent f0f7844f38
commit ce0700ae7a

View File

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