Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4cd424dc
Commit
4cd424dc
authored
Oct 09, 2013
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #19005: Fix documentation for PyIter_Next().
parent
b67c3ff3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
Doc/c-api/iter.rst
Doc/c-api/iter.rst
+5
-6
No files found.
Doc/c-api/iter.rst
View file @
4cd424dc
...
...
@@ -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 specifically for working with iterators.
.. c:function:: PyObject* PyIter_Next(PyObject *o)
Return the next value from the iteration *o*. If the object is an iterator,
this retrieves the next value from the iteration, and returns *NULL* with no
exception set if there are no remaining items. If the object is not an
iterator, :exc:`TypeError` is raised, or if there is an error in retrieving the
item, returns *NULL* and passes along the exception.
Return the next value from the iteration *o*. The object must be an iterator
(it is up to the caller to check this). If there are no remaining values,
returns *NULL* with no exception set. If an error occurs while retrieving
the item, returns *NULL* and passes along the exception.
To write a loop which iterates over an iterator, the C code should look
something like this::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment