summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2015-03-13 00:55:45 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2015-03-13 00:55:45 (GMT)
commit32799953b0bf2cf069c90f8ecc57b1b1d41b7ce8 (patch)
tree6b65e97b77697b9db5b91bec77d986942a415c68 /Doc/c-api
parentce77ee9183fd6b6096e3bedb48a06a459deeec92 (diff)
downloadcpython-32799953b0bf2cf069c90f8ecc57b1b1d41b7ce8.zip
cpython-32799953b0bf2cf069c90f8ecc57b1b1d41b7ce8.tar.gz
cpython-32799953b0bf2cf069c90f8ecc57b1b1d41b7ce8.tar.bz2
Issue #23081: Document that PySequence_List also accepts iterables.
Patch by Lars Buitinck.
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/sequence.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/c-api/sequence.rst b/Doc/c-api/sequence.rst
index cf1e142..5960db9 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)