> > To me, this looks like the main problem is mapping one protocol (in C++) to > another (in Python). Would it help to define some kind of DSL that allows > us to do that? Say, you could define a mapping from (P|C)ython's iterator > protocol (__iter__ and __next__) to corresponding operations in C++, and > Cython would then just insert the corresponding code into the source at the > right places (and maybe replace some place holders). Then you'd have some > default implementation that works with the 'normal' way C++ iterators are > used, and users could extend that to adapt it to other stuff.
Are you saying to "substitute" Python __iter__ and __next__ for iterator operations in C++? I don't think that's cool. I think it's important to let users still use Python functions. Am I right? Or just did a mistake? _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
