

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

Sep 3, 2024 • 1h 31min
Episode 14: Integration Events
We’ve been gone all Summer, visiting two European conferences in the mean time. In this episode we’re talking about them both, talks we liked, as well as our own talks at those events. In a rare turn of events, this one was recorded in person at Łukasz’s home studio in Poznań!
## Outline
(00:00:00) INTRO
(00:01:30) PART 1: EuroPython highlights
(00:02:03) Maintaining pyrepl forward with pypy
(00:05:51) Mai Giménez and her keynote
(00:09:30) Yuliia Barabash and Laysa Uchoa talk memory management
(00:11:03) Core developer panel and sprints
(00:11:56) The abyss stares back at Pablo
(00:18:21) Disappointing
(00:25:50) Łukasz and the all-singing all-dancing pyrepl
(00:33:52) Hackable REPL = new contributors
(00:40:24) PART 2: PyCon PL
(00:42:24) An integration event
(00:44:45) Say No To Notebooks
(00:48:32) Pablo's grandfather's axe
(00:56:00) LL1 made Python easy to read for humans, too
(00:59:29) Python and triangles in the browser
(01:06:16) PART 3: PR OF THE WEEK
(01:13:08) PART 4: WHAT'S GOING ON IN CPYTHON
(01:13:32) HACL* blake2
(01:15:29) New methods on pathlib.Path objects
(01:16:28) PyIter_GetNext
(01:17:20) PyLong_FromInt64
(01:18:07) CALL_ALLOC_AND_ENTER_INIT suitable for Tier 2
(01:19:09) Tier 2 support for BINARY_SUBSCR_GETITEM
(01:19:26) Removal of the CHECK_EVAL_BREAKER macro
(01:20:11) Don't be a jerk on GitHub
(01:21:30) Per-thread heap type refcounts
(01:22:29) Pickling by name for object without __module__ is now faster
(01:23:12) CVE-2024-7592 fixed
(01:24:11) Free threading memory leaks at interpreter shutdown
(01:25:34) The "What's New in 3.13" document getting some love
(01:26:32) Recursion-guarding code improved in the compiler
(01:27:13) A new Android test script for running with emulators
(01:27:28) Core sprint week at Meta coming up!
(01:29:53) OUTRO

Jun 29, 2024 • 1h 52min
Episode 13: A Legit Episode
In this discussion, Brandt Bucher, a core developer involved in Python's PEP work, shares his journey through open source. He delves into the intricacies of pattern matching, the quirks of decorators, and his experiences with the Faster Python team. Brandt reveals unconventional insights about JIT compilation and the infamous n-body benchmark. Expect humorous anecdotes on debugging, the challenges posed by the Global Interpreter Lock, and the difficulties of naming things in programming. The conversation emphasizes community collaboration and the future of Python's performance enhancements.

Jun 10, 2024 • 1h 25min
Episode 12: WTF Python
Python surprises include integer interning with a twist, 'return in finally' behavior, oddities with 'all([[]])', hash values exploration, string interning limitations. Updates on core Python development, new developers, releases, PEP implementations, improvements in debugging tools, and free-threading changes at Bloomberg.

May 28, 2024 • 31min
Episode 11: Live from PyCon 2024
Who says we can't do short episodes? Well, it was a challenge! But with the help of some gentle conference schedule pressure, here's our first sub-hour episode. We're discussing the language summit, answering audience questions, and behaving like serious professionals, as usual.
## Outline
(00:00:00) INTRO
(00:02:01) PEP 602 tweaks: 2 years of bug fix releases
(00:02:45) CalVer for Python versions?
(00:04:51) In Python there's this thing called the C API
(00:08:51) More about PyREPL
(00:12:17) Evolving pdb
(00:14:49) Memhive
(00:16:18) The boring 3.13
(00:18:16) Q&A
(00:18:43) Fashion + favorite bug
(00:22:12) What happens in 2100 with CalVer?
(00:23:02) Subinterpreters or free-threading?
(00:23:41) Where else to find information on current development?
(00:25:40) Will distros provide free-threading builds?
(00:26:23) Will the podcast run out of content?
(00:28:37) OUTRO

12 snips
May 3, 2024 • 1h 23min
Episode 10: The Interactive REPL
Oof, no episode in April, huh? Yeah, we're getting close to Python 3.13 beta 1. PyCon US is also coming up real soon. Let's use this opportunity then to talk about a feature we're teaming up on: a better interactive interpreter!
## Outline
(00:00:00) INTRO
(00:01:53) PART 1: History of Terminals
(00:03:20) /dev/tty
(00:04:51) The first cool word
(00:05:45) Chrząszcz
(00:06:20) Control code characters in ASCII
(00:11:54) PART 2: Python REPL Today
(00:12:34) There is no REPL
(00:15:28) So what is there instead?
(00:19:13) readline
(00:25:38) Source in the REPL
(00:31:13) Implementing a REPL from scratch? Prepare to support arg: 5
(00:36:09) PART 3: PR OF THE WEEK
(00:37:09) Introducing: Complaining Pablo
(00:38:23) Tests are always green if you skip them
(00:39:57) Getting dirty with escape sequences
(00:41:28) Typing finds bugs
(00:42:29) Shiny new features of the new REPL
(00:45:55) Contributing back to PyPy
(00:48:10) We still have two weeks, right?
(00:49:59) Is Python synthwave enough?
(00:51:57) Do we have a bug?
(00:55:31) What's lurking in pydoc?
(00:59:38) PART 4: WHAT'S HAPPENING IN CPYTHON?
(01:02:39) PEP 744: The JIT
(01:06:05) Incremental GC is now actually in
(01:08:21) Tier 2 interpreter updates
(01:10:29) Python supported on iOS with PEP 730
(01:13:11) Better error messages for name shadowing
(01:15:17) Queue.shutdown()
(01:17:14) ctypes adopts heap types
(01:18:26) Free-threading updates
(01:20:14) Dataclass creation is faster
(01:20:44) OUTRO

Mar 14, 2024 • 1h 10min
Episode 9: Py Day with Emily Morehouse-Valcarcel
Let's talk about the Steering Council, running a small consultancy business, the Walrus, and pet peeves with our special guest today!
## Outline
(00:00:00) INTRO
(00:00:56) PART 1: Emily Morehouse
(00:02:15) Running a small consultancy business
(00:04:39) What features of JS do you miss in Python?
(00:05:50) Łukasz outnumbered in a world of Steering Council members
(00:06:12) Upgrading to new Python versions
(00:07:00) It depends on who deployed the project
(00:09:44) Second term as a Steering Council member
(00:11:33) Barry, play some bass for us
(00:13:04) Let's hear a recent war story
(00:15:17) Is this progress bar even working?
(00:17:40) The Villain Origin Story
(00:21:37) Emily, The Bringer of Doom
(00:22:37) Consensus within the Steering Council
(00:25:52) Syntax changes in Python are rare, right? Right?
(00:28:22) On implementing PEP 572
(00:32:52) How would PyCon 2020 in Pittsburgh feel?
(00:34:18) How can you be mad about the Walrus?
(00:36:10) Favorite parts of the standard library
(00:38:10) Is hacking on Python a good experience to newcomers?
(00:40:26) Emily's pet peeve about Python, take 1
(00:42:17) Emily's favorite change in Python in recent years
(00:44:34) Emily's pet peeve about Python, take 2
(00:46:34) Łukasz's pet peeve
(00:48:25) Surprise extra question
(00:49:42) At core.py we are professionals
(00:51:00) PART 2: PR of the Week
(00:54:00) CALL TO ACTION: Upgrade Python.org to Django 4!
(00:56:22) PART 3: What's Going On in CPython?
(00:56:38) Faster Python updates
(01:00:10) Free threading: GIL can be disabled but we're not done yet!
(01:04:17) New defaults for SSL context flags
(01:05:39) python -m asyncio and sys.__interactivehook__
(01:06:24) Surprise question: what is sys.__interactivehook__ even doing?
(01:08:11) OUTRO

Mar 1, 2024 • 1h 43min
Episode 8: The New Parser
The suspense was killing us! OK, the old parser was then... but what about NOW? We're finally answering this question... in more detail than you dared to ask for. PEG, memoization, funky secrets, and how a certain auto-formatter self-inflicted an existential crisis on itself. It's all there, told in barely 100 minutes! Can you believe it?
# Timestamps
(00:00:00) INTRO
(00:00:54) PART 1: What even is PEG?
(00:04:02) You can't prove anything!
(00:05:03) What's a "parsing expression"?
(00:08:23) Our old LL1 parser wasn't doing its job
(00:09:37) "Soft keywords" in LL1: A Horror Story
(00:13:16) PART 2: How PEG was adopted by Python
(00:17:10) Why not LALR?
(00:22:11) The PEG paper wasn't enough either, if we're honest
(00:26:26) Less obvious advantages of the new parser
(00:31:28) Black is stuck with LL1, can it cope?
(00:36:24) Hedging against Łukasz, the bringer of doom
(00:41:14) PART 3: How does the PEG parser of CPython work?
(00:44:30) Pedantic Pablo on "exponential"
(00:45:14) Fresh news from literally yesterday last week
(00:46:39) Pedantic Pablo on "infinite"
(00:47:32) Memoization in the PEG parser
(00:50:41) Parse once, and if it fails, try again!
(00:52:14) How to model a grammar of programming mistakes?
(00:56:36) Why is there C code in my grammar file?
(00:59:57) Bro, do you even lift?
(01:01:45) How soft keywords work today: it's not free lunch
(01:04:29) Funky grammar secrets
(01:09:07) PART 4: PR OF THE WEEK
(01:09:15) audioop.c license shenanigans
(01:14:56) The secret profiler inside CPython (tests)
(01:22:45) PART 5: WHAT'S GOING ON IN CPYTHON?
(01:23:30) Free-threading changes
(01:28:15) Faster Python changes
(01:35:39) End of an era: docs get rid of Python 2 migration info
(01:36:45) Python --help output is now nicer
(01:38:43) SQLite as a dbm backend
(01:41:08) OUTRO

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