~/talk

Text Is Not Text: The History of Strings in Python

TalkinSpanishat PyCon US 2026 · 2026-05-13..05-19· [python]
linkedin:d-hervas
slides:none on file

Reviews the history and problems of C-style char* strings (buffer overflows and exploits) and how UTF-8 became dominant on the web; explains Unicode codepoints use up to 4 bytes and gives the concrete example that an emoji family can have length 7 due to zero-width joiners. Describes CPython’s PEP 393 “kind” optimization that reduced memory for strings, traces Python’s formatting evolution from % to f-strings to PEP 750 T-strings, and explains that T-strings keep template structure and bindings to enable deferred, safer SQL templating that can prevent injection.

AI-written summary · about

  1. 0:00Python strings intro
  2. 2:46What strings measure
  3. 4:17Bits to characters Unicode
  4. 6:32Buffer overflows in C
  5. 8:02ASCII to Unicode challenges
  6. 9:40Encoding problems UTF-8
  7. 13:29Codepoints vs encodings
  8. 14:37Emoji is seven bytes
  9. 15:52Python 2 strings Unicode
  10. 17:55Python 3 Unicode Sandwich
  11. 19:45String formatting evolution
  12. 21:02From printf to f-strings
  13. 24:30F-strings advantages limits
  14. 26:29T-strings structure context
  15. 28:07T-strings vs SQL injection
  16. 30:42Summary string abstraction
  17. 32:00Q&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.