Commit 4077385b authored by gabrieldemarmiesse's avatar gabrieldemarmiesse

Moved and extend an example in pure.rst.

parent 5c04c1a8
import cython
def func(foo: dict, bar: cython.int) -> tuple:
foo["hello world"] = 3 + bar
return foo, 5
......@@ -161,10 +161,7 @@ Static typing
following example. To avoid conflicts with other kinds of annotation
usages, this can be disabled with the directive ``annotation_typing=False``.
::
def func(a_pydict: dict, a_cint: cython.int) -> tuple:
...
.. literalinclude:: ../../examples/tutorial/pure/annotations.py
This can be combined with the ``@cython.exceptval()`` decorator for non-Python
return types::
......
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