We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

f"yeah!" - How we are supercharging f-strings in Python 3.12

Formal Metadata

Title
f"yeah!" - How we are supercharging f-strings in Python 3.12
Title of Series
Number of Parts
141
Author
Contributors
License
CC Attribution - NonCommercial - ShareAlike 4.0 International:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Everybody loves f-strings in Python. But what if they could be even better? Thanks to PEP 701, Python 3.12 will ship with an improved version of f-strings that will once and for all fix the little remaining problems that f-strings have had, while also supercharging them with new cool powers. In this talk, you will discover the dark little secrets of how f-strings were being processed before Python 3.12 and the many things that didn't work and you didn't know about. You will learn how we changed thousands of lines of manually written C code without anybody noticing, how we changed the oldest part of CPython so quotes behave like parentheses, and how we taught the PEG parser to understand f-strings. Plus, you'll gain an understanding of how these new and improved capabilities will provide several advantages for both end-users and library developers, while also reducing the maintenance cost of the CPython implementation.