

core.py
Pablo Galindo and Łukasz Langa
We talk about Python internals, because we work on Python internals. We joke about stuff, because we’re jokers. Episodes between 60 and 90 minutes in length. We’ve done more than a few so far and it doesn’t seem like we’ll be stopping any time soon!
Hi Loren!
Hi Loren!
Episodes
Mentioned books

7 snips
Jan 31, 2024 • 1h 23min
Episode 7: The Old Parser
Delve into the quirks of Python's tokenizer, from invisible tokens to the historical backticks that shaped syntax. Explore the evolution of Python grammar and parsing techniques, emphasizing the challenges of ambiguity and efficiency. Discover the transition from Python 2 to 3 and the role of lib223 in maintaining code integrity. Laugh at the quirks of backslashes and context managers, and learn about recent enhancements in error handling and memory performance in CPython. It's a wild ride through Python's parsing journey!

Jan 8, 2024 • 1h 31min
Episode 6 - An Exceptional Episode
The podcast covers topics such as exceptions, their evolution, and their implementation in Python. It discusses the use of 'try' blocks, the storage of current exceptions, and string exceptions. It also explores PEPs related to exception handling in Python 3K, including exception chaining and suppressing, as well as the difference between 'pass', 'None', and '...' in exception handling. Other interesting topics include zero-cost exceptions in Python 3.11 and the introduction of BaseExceptionGroup and ExceptionGroup in Python 3.10.

Dec 11, 2023 • 1h 21min
Episode 5 - Cinder with Carl Meyer
This time we're hosting a special guest: Carl Meyer from Meta. What is Cinder, how does it work, and how does it intersect with the future of Python 3? Find out in today's episode. 100% serious stuff!
# Timestamps
(00:00:00) INTRO
(00:00:53) Carl Meyer's war story
(00:02:27) CINDER
(00:03:22) Static Python makes things significantly faster
(00:08:15) Cinder JIT and how it's tuned for Instagram
(00:11:57) Strict Python and the joy of import side effects
(00:16:35) The static typing controversy
(00:18:52) Upstreaming changes from Cinder?
(00:22:53) PEP 709: Comprehension inlining
(00:28:35) pip install CinderX
(00:31:19) Immortal instances
(00:35:15) asyncio.eager_task_factory()
(00:39:39) Carl's pet peeve with Python
(00:44:49) PR OF THE WEEK: PyPy's REPL in CPython
(00:52:07) WHAT'S GOING ON IN CPYTHON
(00:52:22) Python 3.12.1
(00:53:17) Python 3.11.7
(00:54:45) multiprocessing.SharedMemory track
(00:56:49) Fine-grained error locations for multi-line expressions
(01:00:03) libedit tab completion is fixed
(01:02:14) Colored exception tracebacks
(01:05:11) Removing testing modules from sys.modules, correctly
(01:06:47) SBOMs are a very serious matter
(01:09:08) Arrays by value on ARM
(01:12:24) Remove development environments and CAPS LOCK
(01:15:30) Interpreter cases generator refactored
(01:16:17) Free-threading news
(01:20:01) OUTRO

49 snips
Nov 29, 2023 • 1h 13min
Episode 4 - Frame Evaluation
What makes Python an interpreter? Today we're talking about ceval.c, the wonders of frame evaluation, and how it changed over the years.
# Timestamps
(00:00:00) INTRO
(00:00:59) BACK TO PYTHON 2.6
(00:02:53) Stack virtual machine
(00:04:41) First encounter with opcodes
(00:08:06) What even is frame evaluation?
(00:12:51) Stack! Which stack?
(00:15:46) PRESENT DAY
(00:16:41) Computed gotos
(00:21:22) PEP 523: JIT me, maybe
(00:26:53) Let's generate the interpreter
(00:29:08) The JIT is coming
(00:33:13) Python function call inlining
(00:37:23) Instrumentation: DTrace, PEP 669
(00:41:50) lltrace and pystats
(00:44:02) Eval breaker
(00:47:54) Signal handling
(00:50:47) Recursion limits
(00:54:27) String concatenation special case
(00:58:24) WHAT'S GOING ON IN CPYTHON?
(00:58:42) 3.12.0a2
(00:59:12) Critical section API adoption
(00:59:34) PyOnceFlag
(01:00:28) PyDict_GetItemRef()
(01:03:36) PyList_Extend() and PyDict_Pop()
(01:04:18) Parser: better error messages for non-matching elif/else
(01:05:39) glob.translate()
(01:07:22) TLS-PSK in the ssl module
(01:08:35) IDLE debugger improvements
(01:10:50) First micro-op in the Tier 2 interpreter
(01:11:18) OUTRO

39 snips
Nov 13, 2023 • 1h 12min
Episode 3 - Imports, frozen modules, Python news
This episode of the podcast covers topics like importing modules and how it works in Python, the concept of frozen modules and its impact on startup time, changes to the evaluation loop in Python, exciting changes in Python 3.12, efficient storage of Unicode code point names, and improvements in thread.join function in Python 3.12 along with the PR of the week related to trace back object creation.

29 snips
Oct 30, 2023 • 1h 15min
Episode 2 - PEP 703: Removing the GIL
The podcast discusses the concept of removing the Global Interpreter Lock (GIL) in Python. It explores the current state of things including reference counting and garbage collection. Various historical attempts to remove the GIL are mentioned. The podcast then dives into the details of PEP 703 for Python 3.13, discussing biased reference counting, speedups, memory management, and the challenges of removing the GIL. It emphasizes the importance of synchronization, avoiding locks, heap segmentation, and memory usage in Python. Lastly, the podcast explores the implementation challenges and considerations of PEP 703, highlighting the need for communication, testing, and coordination.

48 snips
Oct 30, 2023 • 1h 12min
Episode 1 - Core Sprint in Brno & Python 3.13.0 alpha 1
In this first episode Pablo and Łukasz talk about what happened in at the 2023 Cpython Core Developer sprint. Join us and learn from our ramblings about a possible new CPython new JIT compiler, how we are making the REPL easier, what in the world is a memory hive, and how we are trying to make a new C API without making everyone mad.
Timestamps
(00:00:00) Intro
(00:01:02) Cpython core developer sprint
(00:04:54) Pablo's highlights
(00:06:09) Łukasz's highlights
(00:08:08) Coverage in the standard library
(00:12:20) Improving CPython's REPL
(00:20:38) Copy and patch JIT compiler prototype
(00:28:16) Tier1 and Tier2 interpreter
(00:41:25) Python 3.13.0 alpha 1 and doing CPython releases
(00:52:08) C-API improvements
(00:58:28) Sprint experience and tourism
(01:01:49) Steering council Q&A
(01:08:19) Closing thoughts


