When iterating dictionaries, the return value from PyDict_Next is converted to an error, so even when the functions returns 1 meaning "you can keep iterating", go-python assumes it's an exit code != 0.
According to Python docs the integer return value should be treated as a bool (1 meaning True).
When iterating dictionaries, the return value from
PyDict_Next
is converted to an error, so even when the functions returns1
meaning "you can keep iterating",go-python
assumes it's an exit code != 0. According to Python docs the integer return value should be treated as a bool (1 meaningTrue
).