Powering up with t strings in Python 3 14
summary
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
