Issue 19005: PyIter_Next crashes if passed a non-iterator (original) (raw)

Issue19005

Created on 2013-09-11 10:22 by abacabadabacaba, last changed 2022-04-11 14:57 by admin. 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
2022-04-11 14:57:50 admin set github: 63205
2013-10-10 05:44:08 rhettinger set status: open -> closedresolution: fixed
2013-10-10 05:43:40 python-dev set messages: +
2013-10-10 05:39:25 python-dev set nosy: + python-devmessages: +
2013-10-10 05:38:39 rhettinger set type: crash -> components: + Documentation, - Interpreter Coreversions: + Python 2.7, Python 3.4
2013-10-10 05:22:54 rhettinger set messages: +
2013-09-13 22:07:35 vstinner set nosy: + vstinner
2013-09-12 07:17:46 rhettinger set assignee: rhettingernosy: + rhettinger
2013-09-11 10:22:22 abacabadabacaba create