PEP 750 – Template Strings has been accepted

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. go

    The Go programming language

    It's fascinating how differently languages approach the string formatting design space.

    - Java's been trying to add f/t-strings, but its designers appear to be perfectionists to a fault, unable to accept anything that doesn't solve every single problem possible to imagine: [1].

    - Go developers seem to have taken no more than 5 minutes considering the problem, then thoughtlessly discarded it: [2]. A position born from pure ignorance as far as I'm concerned.

    - Python, on the other hand, has consistently put forth a balanced approach of discussing each new way of formatting strings for some time, deciding on a good enough implementation and going with it.

    In the end, I find it hard to disagree with Python's approach. Its devs have been able to get value from first the best variant of sprintf in .format() since 2008, f-strings since 2016, and now t-strings.

    [1]: https://news.ycombinator.com/item?id=40737095

    [2]: https://github.com/golang/go/issues/34174#issuecomment-14509...

  2. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  3. awesome-tagged-templates

    A list of libraries and learning resources for ES2015 tagged template literals

    It reminds me of javascripts template literals (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...) and .nets FormattableString (https://learn.microsoft.com/en-us/dotnet/api/system.formatta...)

    The best use case I know of for these kinds of things is as a way to prevent sql injection. SQL injection is a really annoying attack because the "obvious" way to insert dynamic data into your queries is exactly the wrong way. With a template string you can present a nice API for your sql library where you just pass it "a string" but it can decompose that string into query and arguments for proper parameterization itself without the caller having to think about it.

  4. pep750-examples

    Examples of using t-strings as defined in PEP 750

    One place we landed with PEP 750 is that Template instances have no natural string rendering.

    That is, you must process a Template in some way to get a useful string out the other side. This is why Template.__str__() is spec'd to be the same as Template.__repr__().

    If you want to render a Template like an f-string for some reason, the pep750 examples repo contains an implementation of an `f(template: Template) -> str` method: https://github.com/davepeck/pep750-examples/blob/main/pep/fs...

  5. sql-tstring

    SQL-tString allows for f-string like construction of sql queries

    If you want to see a usage for this I've built, and use, [SQL-tString](https://github.com/pgjones/sql-tstring) as an SQL builder.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Go Blog: Generic Interfaces

    1 project | news.ycombinator.com | 8 Jul 2025
  • From Polling to Partying: Writing Cooler Goroutines with sync.Cond

    1 project | dev.to | 25 Jun 2025
  • I Built My Own Programming Language and its Virtual Machine In Python!

    4 projects | dev.to | 24 Jun 2025
  • Google Cloud Incident Report – 2025-06-13

    4 projects | news.ycombinator.com | 14 Jun 2025
  • Green Tea Garbage Collector

    1 project | news.ycombinator.com | 13 Jun 2025

Did you know that Python is
the 2nd most popular programming language
based on number of references?