[C++-sig] call python iterable (handle StopIteration?)

Neal Becker ndbecker2 at gmail.com
Tue Jul 17 15:42:25 CEST 2007


I want to call a python iterable from c++.  Can I do this?
  while (true) {
    T n = extract<T> (o.attr ("next")());
    tmp.push_back (n);
  }

How do I (can I?) catch the StopIteration exception? 




More information about the Cplusplus-sig mailing list