classification
Title: PyIter_Next crashes if passed a non-iterator
Type: Stage:
Components: Documentation Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: abacabadabacaba, python-dev, rhettinger, vstinner
Priority: normal Keywords:

Created on 2013-09-11 10:22 by abacabadabacaba, last changed 2013-10-10 05:44 by rhettinger. This issue is now closed.

Messages (4)
msg197483 - (view) Author: Evgeny Kapun (abacabadabacaba) Date: 2013-09-11 10:22
According to the documentation, PyIter_Next should raise TypeError if passed an object which is not an iterator as an argument. Instead, it calls a function through a null pointer, which leads to a crash.
msg199360 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2013-10-10 05:22
This is a documentation bug.  As you noted, the input must be an iterator. It is up to the C programmer to assure this precondition is met.
msg199361 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-10 05:39
New changeset 0820e8394d96 by Raymond Hettinger in branch '2.7':
Issue #19005:  Fix documentation for PyIter_Next().
http://hg.python.org/cpython/rev/0820e8394d96
msg199362 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-10 05:43
New changeset 249ba942a6d4 by Raymond Hettinger in branch '3.3':
Issue #19005:  Fix documentation for PyIter_Next().
http://hg.python.org/cpython/rev/249ba942a6d4
History
Date User Action Args
2013-10-10 05:44:08rhettingersetstatus: open -> closed
resolution: fixed
2013-10-10 05:43:40python-devsetmessages: + msg199362
2013-10-10 05:39:25python-devsetnosy: + python-dev
messages: + msg199361
2013-10-10 05:38:39rhettingersettype: crash ->
components: + Documentation, - Interpreter Core
versions: + Python 2.7, Python 3.4
2013-10-10 05:22:54rhettingersetmessages: + msg199360
2013-09-13 22:07:35vstinnersetnosy: + vstinner
2013-09-12 07:17:46rhettingersetassignee: rhettinger

nosy: + rhettinger
2013-09-11 10:22:22abacabadabacabacreate