Understanding How Python Executes Your Code Internally
Explore the inner workings of Python's execution process by examining CPython's internals and tracing a simple Python function from start to finish.
About this video
How does Python actually execute your code? In this video, we'll dive into CPython's internals and follow a simple Python function through its complete execution pipeline:
- Lexical Analysis (tokenization)
- Abstract Syntax Tree (AST) creation
- Bytecode compilation
- Execution by the Python Virtual Machine
We'll look at the actual CPython source code and see how Python transforms your code every step of the way. Whether you're a Python developer wanting to understand the language better, or just curious about how programming languages work, this video will give you a better understanding of Python's execution process.
Resources:
Source code: https://github.com/deepdivedevs/python-internals-overview
CPython: https://github.com/python/cpython
Visualise AST library: https://github.com/JamesPhillipsUK/vast
Be sure to follow me on these other platforms for more tutorials:
Twitter: https://www.x.com/deepdivedevs
TikTok: https://www.tiktok.com/@deepdivedev
Timestamps
00:00 | Intro
00:23 | Lexer/Tokenizer
00:55 | Abstract Syntax Trees
01:33 | Bytecode
02:21 | Interpreter
03:00 | tokenize module
04:26 | dis module
04:50 | CPython Source Code
07:21 | Outro
#python #coding #cpython #tokenizer #lexer #parser #ast #abstractsyntaxtree #interpreter #tokenize #dis #softwaredeveloper #computerscience #code #softwareengineer #coding #learntocode2024 #learnpython
Video Information
Views
473
Total views since publication
Likes
17
User likes and reactions
Duration
7:32
Video length
Published
Oct 24, 2024
Release date
Quality
hd
Video definition
About the Channel
Related Trending Topics
LIVE TRENDSThis video may be related to current global trending topics. Click any trend to explore more videos about what's hot right now!
THIS VIDEO IS TRENDING!
This video is currently trending in United Kingdom under the topic 'people's postcode'.