Jeroen Demeyer schrieb am 31.07.2018 um 14:01:
On 2018-07-31 12:56, Victor Stinner wrote:
I would be nice to be able to use something to "generate" C extensions, maybe even from pure Python code.
Cython has a "pure Python mode" which does exactly that. There are several ways to include typing information, to ensure that a module remains Python-compatible but can be compiled by Cython in an optimized way.
FWIW, modules like difflib can easily be speed up by factors when compiling and optimising them with Cython, without giving up the Python syntax compatibility. I just gave a Cython talk at EuroPython last week where I used difflib as one of my examples.