3 ms·
I highly recommend Victor Skvortsov's exhaustive, 12-part series, "Python Behind the Scenes," a deep dive into the implementation details of just about every Py
by neoncontrails 5y ago
I highly recommend Victor Skvortsov's exhaustive, 12-part series, "Python Behind the Scenes," a deep dive into the implementation details of just about every Python language feature one could possibly take for granted. There isn't a single one I haven't learned something from, but some of my personal favorites include:
* Part 2, How the CPython compiler works: https://tenthousandmeters.com/blog/python-behind-the-scenes-2-how-the-cpython-compiler-works/ https://tenthousandmeters.com/blog/python-behind-the-scenes-...
* Part 6, How Python's object system works: https://tenthousandmeters.com/blog/python-behind-the-scenes-6-how-python-object-system-works/ https://tenthousandmeters.com/blog/python-behind-the-scenes-...
* Part 10, How Python dictionaries work: https://tenthousandmeters.com/blog/python-behind-the-scenes-10-how-python-dictionaries-work/ https://tenthousandmeters.com/blog/python-behind-the-scenes-...
* Part 13: The GIL and its effects on Python multithreading: https://tenthousandmeters.com/blog/python-behind-the-scenes-13-the-gil-and-its-effects-on-python-multithreading/ https://tenthousandmeters.com/blog/python-behind-the-scenes-...
The whole series can be found here: https://tenthousandmeters.com/tag/python-behind-the-scenes/ https://tenthousandmeters.com/tag/python-behind-the-scenes/
For a slightly higher-level (i.e., no macabre, low-level C code), but still incredibly enlightening dive into the "dark side" of Python, in particular various abuses and hexes for manipulating control flow, have a look at David Beazley's smorgasboard of keynote presentations like "Generators: The Final Frontier" (https://www.dabeaz.com/finalgenerator/ https://www.dabeaz.com/finalgenerator/), "Python Concurrency From The Ground Up" (https://www.youtube.com/watch?v=MCs5OvhV9S4 https://www.youtube.com/watch?v=MCs5OvhV9S4), and "Build Your Own Async" (https://www.youtube.com/watch?v=Y4Gt3Xjd7G8&t=2045s https://www.youtube.com/watch?v=Y4Gt3Xjd7G8&t=2045s).