[issue7321] PyIter_Check(obj) fails when obj is of type PySetType

2009-11-14 Thread Damian Eads
New submission from Damian Eads damian.e...@gmail.com: The instructions for the C interface to the Python set class http://docs.python.org/c-api/set.html say to use PyObject_GetIter and follow the iterator protocol. After following the instructions for the iterator protocol here,

[issue7321] PyIter_Check(obj) fails when obj is of type PySetType

2009-11-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Set objects are iterable, they are not iterators themselves. In other words, PyIter_Check() should return true when called with the result of PyObject_GetIter() (but normally you don't need to check anyway). -- nosy: +pitrou resolution: