Oddbean new post about | logout
 [$] Custom string formatters in Python


Python has had
https://lwn.net/Articles/656898/

(f-strings), a syntactic shorthand for building
strings, since 2015. Recently, Jim Baker, Guido van Rossum, and Paul Everitt have
proposed
<a href="https://peps.python.org/pep-0750/" rel="nofollow">
PEP 750</a> ("Tag Strings For Writing Domain-Specific Languages") which would
generalize and expand that mechanism to provide Python library writers with additional
flexibility. Reactions to the proposed change were somewhat positive, although
there was a good deal of discussion of (and opposition to)
the PEP's inclusion of lazy evaluation of template parameters.


https://lwn.net/Articles/985346/