[issue24161] PyIter_Check returns false positive for objects of type instance

2015-05-10 Thread behzad nouri
behzad nouri added the comment: > That works for builtin types but not for user defined classes > Rather than using PyIter_Check(), extensions should just call next() on > object and see whether it succeeds but then, what would be the use case of PyIter_Check outside of py

[issue24161] PyIter_Check returns false positive for objects of type instance

2015-05-10 Thread behzad nouri
New submission from behzad nouri: - python 2 only, not reproducible on python 3 Attached file makes an extension module which just returns PyIter_Check value on passed object. Calling the function with an object of type "instance" returns true, even though the object is no