[New-bugs-announce] [issue7321] PyIter_Check(obj) fails when obj is of type PySetType

Damian Eads report at bugs.python.org
Sat Nov 14 10:08:49 CET 2009


New submission from Damian Eads <damian.eads at 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,

  http://docs.python.org/c-api/iter.html

I was able to successfully iterate through a set object. However,
PyIter_Check(obj) returns false yet set objects follow the iterator
protocol. Is this the correct behavior?

Thank you.

Kind regards,

Damian Eads

----------
messages: 95229
nosy: damianeads
severity: normal
status: open
title: PyIter_Check(obj) fails when obj is of type PySetType
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7321>
_______________________________________


More information about the New-bugs-announce mailing list