[Python-checkins] cpython (merge 3.4 -> default): Issue #23081: Document that PySequence_List also accepts iterables.
berker.peksag
python-checkins at python.org
Fri Mar 13 01:55:07 CET 2015
https://hg.python.org/cpython/rev/eb4a0048978c
changeset: 94968:eb4a0048978c
parent: 94966:390a2f4dfd4a
parent: 94967:e31e987207ab
user: Berker Peksag <berker.peksag at gmail.com>
date: Fri Mar 13 02:56:12 2015 +0200
summary:
Issue #23081: Document that PySequence_List also accepts iterables.
Patch by Lars Buitinck.
files:
Doc/c-api/sequence.rst | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Doc/c-api/sequence.rst b/Doc/c-api/sequence.rst
--- a/Doc/c-api/sequence.rst
+++ b/Doc/c-api/sequence.rst
@@ -107,8 +107,9 @@
.. 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)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list