Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 09bb904

Browse files
committed
Issue #23081: Document that PySequence_List also accepts iterables.
Patch by Lars Buitinck.
2 parents 406221c + 3279995 commit 09bb904

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Doc/c-api/sequence.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ Sequence Protocol
107107
108108
.. c:function:: PyObject* PySequence_List(PyObject *o)
109109
110-
Return a list object with the same contents as the arbitrary sequence *o*. The
111-
returned list is guaranteed to be new.
110+
Return a list object with the same contents as the sequence or iterable *o*,
111+
or *NULL* on failure. The returned list is guaranteed to be new. This is
112+
equivalent to the Python expression ``list(o)``.
112113
113114
114115
.. c:function:: PyObject* PySequence_Tuple(PyObject *o)

0 commit comments

Comments
 (0)