~/talk

Powering up with t strings in Python 3 14

Talkat PyBay 2025 · on Saturday, 2025-10-18· [python]
name:Jim Baker
links:none on file
slides:none on file

Python 3.14 introduces t-strings that produce template objects preserving interpolation structure, enabling automatic structured logging, HTML DOM-like templating (JSX-style rendering with context-sensitive escaping), and safe SQL composition via psycopg3 format-spec SQL escaping. Converting f-strings to t-strings is practical; raw templates support caching. Performance note: emulating f-string behavior in Python code is about 17x slower than native f-strings, but mixed use (t-strings for structure, f-strings for formatting) works well.

AI-written summary · about

  1. 0:00Introduction to t-strings
  2. 1:50Working with template objects
  3. 6:12Structured logging applications
  4. 11:05Building HTML with TDOM
  5. 13:55Safe SQL composition
  6. 20:41Technical details and future ideas
  7. 24:05Q&A and closing remarks
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.