Commit c7e5a230 authored by Robert Bradshaw's avatar Robert Bradshaw

For loop docs fix and pointer iteration.

parent 824b6ca2
......@@ -485,7 +485,17 @@ For-loops
for i in range(n):
...
* The other form available in C is the for-from style
* Iteration over C arrays is also permitted, e.g.
::
cdef double x
cdef double* data
for x in data[:10]:
...
* Iterating over many builtin types such as lists and tuples is optimized.
* There is also a more C-style for-from syntax
* The target expression must be a variable name.
* The name between the lower and upper bounds must be the same as the target name.
......@@ -500,7 +510,7 @@ For-loops
* To reverse the direction, reverse the conditional operation::
for i from 0 >= i > n:
for i from n > i >= 0:
...
* The ``break`` and ``continue`` are permissible.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment