5 ms·
Hi! This is part 4 of my Python behind the scenes series. The goal of this post is to understand how the CPython VM executes Python bytecode. You'll learn: -
by r4victor 6y ago
Hi! This is part 4 of my Python behind the scenes series. The goal of this post is to understand how the CPython VM executes Python bytecode. You'll learn:
- what is the evaluation loop and how it's implemented
- when and how a thread may stop executing the bytecode to
release the GIL
- how CPython computes things
- how CPython handles exceptions and implements statements
like try-except, try-finally and with
I appreciate your feedback! Thanks!
- alexpetralia 6y agoThis looks like great information. Thanks for sharing!
- heinrichhartman 6y agoReally enjoyed the read! Thanks for taking the time to write this down. It's easy to forget, that if you are running "Python" in production, you are actually running CPython on a x86 VM configured with a bunch of *.py files. When things go sideways, you might find yourself in a situation where knowing CPython internals becomes relevant.
- borishn 6y agoThanks Victor, this is really useful and well written.