What Happens When You Run Python
Talk it through out loud with your AI coach.
The problem
- easy
- Pro
A colleague says Python is purely interpreted, line by line, and asks what the pycache folders full of dot pyc files are doing in the project. Explain what actually happens when CPython runs your code.
What a strong answer covers
- The step between source code and execution.
- What runs that intermediate form.
- What the cached files in the project are for and when they're refreshed.
- A way to look inside, or a common misunderstanding about the cache.
Common mistake: Saying Python compiles to machine code, or that the cached files make code faster to run rather than faster to load.
Knowing this is half of it. Saying it clearly out loud is the part the coach helps you practise.
Practise it out loud