4 полезные статьи о внутреннем устройстве питона

Опубликовано 29 March 2018 в Python

Maybe, knowing Python internals is a thing you should know to be a good Python developer. However, if you want to improve your code it becomes more important. If you know it works under the hood, you write a code with less stupid mistakes and architecture issues.

#1 CPython internals: A ten-hour codewalk through the Python interpreter source code

Here are nine lectures walking through the internals of CPython, the canonical Python interpreter implemented in C. They were from a dynamic programming languages course that I taught in Fall 2014 at the University of Rochester. The format isn't ideal, but I haven't seen this level of detail about CPython presented online, so I wanted to share these videos.

#2 Getting Started with Python Internals

Getting Started with Python Internals is a summary of Philip Guo's codewalk. The main difference is that in this article Python 3.6 is used.

#3 Python internals: adding a new statement to Python

This article is an attempt to better understand how the front-end of Python works. Just reading documentation and source code may be a bit boring, so I'm taking a hands-on approach here: I'm going to add an until statement to Python.

Eli Bendersky has written many interesting articles about Python internals. You can find them here

#4 Garbage collection in Python: things you need to know

Usually, you do not need to worry about memory management when the objects are no longer needed Python automatically reclaims the memory from them. However, understanding how GC works can help you write better Python programs.

Like Eli Bendersky, Artem Golubin has written several articles about CPython that worth reading.

Extra...

Pypy:

  • http://doc.pypy.org/en/latest/interpreter.html
  • http://doc.pypy.org/en/latest/cpython_differences.html
  • https://morepypy.blogspot.ru/2017/10/how-to-make-your-code-80-times-faster.html

Another list:

  • https://github.com/amygdalama/python-internals
---
Возник вопрос? Мне всегда можно написать в Twitter: avkorablev