~/talk

PEP 750 - T-strings: safer and smarter string processing

Talkat PyCon US 2026 · 2026-05-13..05-19· [python, web-platform, security]
links:none on file
slides:none on file

PEP 750 ships t‑strings in Python 3.14 as a template object type that yields an intermediate object not a plain str, exposing .strings, .interpolation and .values so code can run lazy interpolation, sanitise inputs (XSS, SQL injection), transform and compose templates before rendering. The implementation is in the string package and libraries already backport sanitizer helpers (html, tsql). Demos show a processing method that concatenates and escapes correctly; tradeoffs are extra boilerplate, some runtime cost and partial standardisation.

AI-written summary · about

  1. 0:00Introduction
  2. 2:53Motivations behind T-strings
  3. 4:58Limitations of string methods
  4. 8:29What are T-strings
  5. 11:44Processing T-strings
  6. 13:29T-strings vs other methods
  7. 14:56Security use cases
  8. 16:42DSL and template breakdown
  9. 17:23T-strings for logging
  10. 18:27Drawbacks and performance
  11. 20:54Standardization challenges
  12. 21:36Final thoughts
  13. 23:25Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.