From: Rob S. <rob...@si...> - 2007-04-11 15:06:22
|
In http://sourceforge.net/mailarchive/message.php?msg_name=200703131557.l2DFv7VI023418%40vanzandt.balstatdev.susq.com, I described my efforts to make a C++ class iterable in Python. The problem remains. 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? Is there another approach I should take to make this work? -- Rob Stewart rob...@si... Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer; |