A walk with CPython (sps23)

Published: Sept. 21, 2023, 11:35 a.m.

Did you know that Python has a compiler even though it\u2019s an interpreted language? In this talk, we will embark on a step-by-step exploration of a simple program, unraveling the inner workings of CPython \u2014 the default reference implementation of Python. We\u2019ll begin with the compiler, which performs the task of converting Python code into OPCODES. Next, we\u2019ll explore the famous interpreter. We\u2019ll uncover how it works with the generated OPCODES, executing the program line by line and talk about an example of optimisations it does along the way. We\u2019ll explore how Python manages variables, function calls, and exceptions. Additionally, we\u2019ll touch upon object creation and destruction. The primary aim of this talk is to provide a concise yet comprehensive overview of the components involved in executing a simple program within CPython. Through precise references to the CPython code base, attendees will be equipped to explore further on their own.\n\nDid you know that Python has a compiler even though it\u2019s an interpreted language? In this talk, we will embark on a step-by-step exploration of a simple program, unraveling the inner workings of CPython \u2014 the default reference implementation of Python. We\u2019ll begin with the compiler, which performs the task of converting Python code into OPCODES. Next, we\u2019ll explore the famous interpreter. We\u2019ll uncover how it works with the generated OPCODES, executing the program line by line and talk about an example of optimisations it does along the way. We\u2019ll explore how Python manages variables, function calls, and exceptions. Additionally, we\u2019ll touch upon object creation and destruction. The primary aim of this talk is to provide a concise yet comprehensive overview of the components involved in executing a simple program within CPython. Through precise references to the CPython code base, attendees will be equipped to explore further on their own.\nabout this event: https://www.python-summit.ch/