*sigh* .. slow down...

Corrections:

> could be turned into the much more efficient
>
> for idx from 0 <= len(a):
>   
This should be:

for idx from 0 <= idx < len(a):

> for (T* iter = start; iter != v.end(); ++iter) ...
>
> could be done by something like
>
> for iterator in c_iteration(a.begin(), a.end()):
>   print iterator.get()
>   iterator.set(3)
>   
This should be:

for (T* iter = start; iter != end; ++iter) ...

could be done by something like:

for iterator in c_iteration(start, end):
   print iterator.get()
   iterator.set(3)

(When used with STL containers, start and end would typically be 
a.begin() and a.end() though.)

Of course, c_iteration would also be a Cython builtin (for speed).

BTW the enumerate feature would be a prime candidate for a simple demo 
transform so that's a reason for me to take it on if it gets support. 
(Without char* support for now, can extend to char* support after the 
phase seperation.)

If enumerate already *is* supported (didn't check...) then I apologize...

Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to