SIGN IN SIGN UP

gh-105201: Add PyIter_NextItem() (#122331)

Return -1 and set an exception on error; return 0 if the iterator is
exhausted, and return 1 if the next item was fetched successfully.

Prefer this API to PyIter_Next(), which requires the caller to use
PyErr_Occurred() to differentiate between iterator exhaustion and errors.

Co-authered-by: Irit Katriel <iritkatriel@yahoo.com>
E
Erlend E. Aasland committed
e006c7371d8e57db26254792c67292956e88d81d
Parent: 540fcc6
Committed by GitHub <noreply@github.com> on 8/7/2024, 10:47:15 PM