|
From: Josh C. <jc...@nc...> - 2007-04-11 15:34:42
|
On Wed, 11 Apr 2007, Rob Stewart wrote: > I've implemented __iter__ to satisfy > http://docs.python.org/lib/typeiter.html, but the SWIG-wrapped > object returned isn't recognized by PyIter_Check() (which isn't > documented as necessary by typeiter.html). > > The problem is that the swigged iterator's type object doesn't > set Py_TPFLAGS_HAVE_ITER. How can I affect SWIG's type object > for my iterator objects? For what Python code is this an issue? Or are you writing C code that manipulates Python objects? As far as I know, user classes that implement what's in typeiter.html work fine for the common uses of iterators, so I'm wondering where you run into this? Josh |