Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
c7e5a230
Commit
c7e5a230
authored
Aug 05, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For loop docs fix and pointer iteration.
parent
824b6ca2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
docs/src/reference/language_basics.rst
docs/src/reference/language_basics.rst
+12
-2
No files found.
docs/src/reference/language_basics.rst
View file @
c7e5a230
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment