Commit 0d34d0cd authored by Berker Peksag's avatar Berker Peksag

Issue #23081: Document that PySequence_List also accepts iterables.

Patch by Lars Buitinck.
parent 2b4b138f
......@@ -107,8 +107,9 @@ Sequence Protocol
.. c:function:: PyObject* PySequence_List(PyObject *o)
Return a list object with the same contents as the arbitrary sequence *o*. The
returned list is guaranteed to be new.
Return a list object with the same contents as the sequence or iterable *o*,
or *NULL* on failure. The returned list is guaranteed to be new. This is
equivalent to the Python expression ``list(o)``.
.. c:function:: PyObject* PySequence_Tuple(PyObject *o)
......
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