From: Berker Peksag Date: Fri, 13 Mar 2015 00:55:45 +0000 (+0200) Subject: Issue #23081: Document that PySequence_List also accepts iterables. X-Git-Tag: v3.5.0a3~189^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=32799953b0bf2cf069c90f8ecc57b1b1d41b7ce8;p=thirdparty%2FPython%2Fcpython.git Issue #23081: Document that PySequence_List also accepts iterables. Patch by Lars Buitinck. --- diff --git a/Doc/c-api/sequence.rst b/Doc/c-api/sequence.rst index cf1e1420e0bb..5960db9d42f9 100644 --- a/Doc/c-api/sequence.rst +++ b/Doc/c-api/sequence.rst @@ -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)