Commit 71f29c9e authored by Dr Alex Meakins's avatar Dr Alex Meakins Committed by GitHub

Small fixes to language and mark-up.

parent 7433684f
...@@ -149,11 +149,12 @@ respectively, as statically typing variables with these Python ...@@ -149,11 +149,12 @@ respectively, as statically typing variables with these Python
types has zero advantages. types has zero advantages.
Cython provides an accelerated and typed equivalent of a Python tuple. Cython provides an accelerated and typed equivalent of a Python tuple.
A ``ctuple`` is assembled from any valid C types, for example:: A ``ctuple`` is assembled from any valid C types. For example::
cdef (double, int) bar cdef (double, int) bar
They can be used like a Python tuple, including as function arguments and as return types. They can be used efficient alternatives to Python tuples, including in
function definitions.
While these C types can be vastly faster, they have C semantics. While these C types can be vastly faster, they have C semantics.
Specifically, the integer types overflow Specifically, the integer types overflow
...@@ -215,7 +216,7 @@ using normal C declaration syntax. For example,:: ...@@ -215,7 +216,7 @@ using normal C declaration syntax. For example,::
cdef int eggs(unsigned long l, float f): cdef int eggs(unsigned long l, float f):
... ...
''ctuples'' may also be used:: ``ctuples`` may also be used::
cdef (int, float) chips((long, long, double) t): cdef (int, float) chips((long, long, double) t):
... ...
......
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