Issue 4897: PyIter_Next documentation inconsistent with implementation (original) (raw)
Issue4897
Created on 2009-01-09 14:52 by garcia, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (4) | ||
---|---|---|
msg79472 - (view) | Author: garcia (garcia) | Date: 2009-01-09 14:52 |
The documentation for PyIter_Next says it will raise TypeError if the object passed to it is not an iterator. However, the implementation in abstract.c performs an assert rather than raising TypeError. I would prefer if the implementation were adjusted to match the documentation rather than vice-versa. | ||
msg79481 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2009-01-09 17:38 |
Closing a duplicate of #3720. | ||
msg79488 - (view) | Author: garcia (garcia) | Date: 2009-01-09 18:59 |
Thanks for the quick response. I see that the discussion in 3720 implicitly involves the implementation of PyIter_Next, but the documentation for PyIter_Next (and its conflict with the implementation) is not mentioned. | ||
msg79489 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2009-01-09 19:00 |
The reason I linked to that issue is that the proposed patch brings the implementation inline with the documentation as you wished. :) |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:43 | admin | set | github: 49147 |
2009-01-09 19:00:57 | benjamin.peterson | set | messages: + |
2009-01-09 18:59:39 | garcia | set | messages: + |
2009-01-09 17:38:08 | benjamin.peterson | set | status: open -> closedresolution: duplicatesuperseder: segfault in for loop with evil iteratormessages: + nosy: + benjamin.peterson |
2009-01-09 14:52:15 | garcia | create |