Skip to content

Commit 456660c

Browse files
committed
Last bit of unhandled PR review from realpython#370
1 parent 2d6521e commit 456660c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/scenarios/speed.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,11 @@ C Extensions
6868
Cython
6969
------
7070

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:
7376

7477
.. code-block:: python
7578
@@ -121,9 +124,8 @@ This implementation of an algorithm to find prime numbers has some additional ke
121124
n = n + 1
122125
return result
123126
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:
127129

128130

129131
.. code-block:: python

0 commit comments

Comments
 (0)