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
cb13a197
Commit
cb13a197
authored
Jun 18, 2018
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved a code snippet from the pure.rst to the examples directory. Fixed a small bug.
parent
5c04c1a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
docs/examples/tutorial/pure/locals.py
docs/examples/tutorial/pure/locals.py
+6
-0
docs/src/tutorial/pure.rst
docs/src/tutorial/pure.rst
+2
-5
No files found.
docs/examples/tutorial/pure/locals.py
0 → 100644
View file @
cb13a197
import
cython
@
cython
.
locals
(
a
=
cython
.
long
,
b
=
cython
.
long
,
n
=
cython
.
longlong
)
def
foo
(
a
,
b
,
x
,
y
):
n
=
a
*
b
# ...
docs/src/tutorial/pure.rst
View file @
cb13a197
...
...
@@ -140,12 +140,9 @@ Static typing
e = cython.declare(cython.int, 5, visibility='readonly')
* ``@cython.locals`` is a decorator that is used to specify the types of local
variables in the function body (including the arguments):
:
variables in the function body (including the arguments):
@cython.locals(a=cython.double, b=cython.double, n=cython.p_double)
def foo(a, b, x, y):
n = a*b
...
.. literalinclude:: ../../examples/tutorial/pure/locals.py
* ``@cython.returns(<type>)`` specifies the function's return type.
...
...
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