r/learnpython • • Jan 03 '25

Are extensions like Cython really turn Python into a compiled language?

I was chatting with chatGPT the other day and he told me about compiled and interpreted languages. He’s also told me about extensions like Cython that aim to make your Python code compiled. So, I was wondering if they really give your code the benefits of compiled languages or they work in a different way

P.s. I apologize in advance if my question makes no sense. I’ve never dealt with compiled languages and I have vague knowledge about them

0 Upvotes

13 comments sorted by

View all comments

2

u/JamzTyson Jan 03 '25

Cython does not turn Python into a compiled language. Python is, and I expect will always be an interpreted language.

I have never seen a non-trivial program written entirely in Cython. The much more common approach is to implement performance critical parts of a Python program in Cython.

The introcuctory paragraph on https://cython.org/ provides a good description of what Cython is.