File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,11 @@ C Extensions
68
68
Cython
69
69
------
70
70
71
- With `Cython <http://cython.org/ >`_ you are able to write C and C++ modules for Python. It implements a superset of the Python language.
72
- You are also able to call C-functions and realize declaration of variables and functions like in C. Here is an example:
71
+ `Cython <http://cython.org/ >`_ implements a superset of the Python language
72
+ with which you are able to write C and C++ modules for Python. Cython also
73
+ allows you to call functions from compiled C libraries. Using Cython allows
74
+ you to take advantage of Python's strong typing of variables and operations.
75
+ Here is an example of strong typing with Cython:
73
76
74
77
.. code-block :: python
75
78
@@ -121,9 +124,8 @@ This implementation of an algorithm to find prime numbers has some additional ke
121
124
n = n + 1
122
125
return result
123
126
124
-
125
-
126
- The only difference between the both algorithm is this part:
127
+ Notice that in the Cython version you declare integers and integer arrays for
128
+ to be compiled into C types while also creating a Python list:
127
129
128
130
129
131
.. code-block :: python
You can’t perform that action at this time.
0 commit comments