cpython: 249ba942a6d4 (original) (raw)

Mercurial > cpython

changeset 86193:249ba942a6d4 3.3

Issue #19005: Fix documentation for PyIter_Next(). [#19005]

Raymond Hettinger python@rcn.com
date Wed, 09 Oct 2013 22:42:46 -0700
parents f917b25f4786
children 98d8551276b4 4e301c80f5d1
files Doc/c-api/iter.rst
diffstat 1 files changed, 5 insertions(+), 6 deletions(-)[+] [-] Doc/c-api/iter.rst 11

line wrap: on

line diff

--- a/Doc/c-api/iter.rst +++ b/Doc/c-api/iter.rst @@ -5,7 +5,7 @@ Iterator Protocol ================= -There are only a couple of functions specifically for working with iterators. +There are two functions specifically for working with iterators. .. c:function:: int PyIter_Check(PyObject o) @@ -14,11 +14,10 @@ There are only a couple of functions spe .. c:function:: PyObject PyIter_Next(PyObject *o)

To write a loop which iterates over an iterator, the C code should look something like this::