Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
As discussed incapi-workgroup/problems#1, we have some C API functions that have ambiguous return values, requiring the caller to queryPyErr_Occurred() to find out whether there was an error.
We will try to move away from those APIs to alternative ones whose return values non-ambiguously indicate whether there has been an error, without requiring the user to callPyErr_Occurred().
In this issue we will discuss the iterator API.PyIter_Next return NULL for both error and for the iterator being exhausted.PyErr_Occurred() distinguishes between the cases.