3 ms·
The author has a number of other good articles going into the depths of CPython here: https://codeconfessions.substack.com/t/cpython-internals https://codeconfe
by pbrowne011 3y ago
The author has a number of other good articles going into the depths of CPython here: https://codeconfessions.substack.com/t/cpython-internals https://codeconfessions.substack.com/t/cpython-internals.
One of them goes into how many lines of C it takes to execute "a + b" in Python (great explanation, but you have to go to the comments for the answer!). I remember one of my professors opening up gdb and printing every C line to execute "print("hello, world")", and the author's writings give a better understanding of what some of those lines are.
I'd be very interested in a follow-up post going in-depth on the ins and outs of list comprehension.
- abhi9u 3y agoThank you (author here). I have not looked into list comprehensions. I think that and how generators work internally might be interesting to write about. I will try to cover them.