What are some drawbacks of the Python language?

Technology CommunityCategory: PythonWhat are some drawbacks of the Python language?
VietMX Staff asked 3 years ago

The two most common valid answers to this question (by no means intended as an exhaustive list) are:

  • The Global Interpreter Lock (GIL). CPython (the most common Python implementation) is not fully thread safe. In order to support multi-threaded Python programs, CPython provides a global lock that must be held by the current thread before it can safely access Python objects. As a result, no matter how many threads or processors are present, only one thread is ever being executed at any given time. In comparison, it is worth noting that the PyPy implementation discussed earlier in this article provides a stackless mode that supports micro-threads for massive concurrency.
  • Execution speed. Python can be slower than compiled languages since it is interpreted. (Well, sort of. See our earlier discussion on this topic.)