[Python-ideas] String interpolation for all literal strings

Chris Angelico rosuav at gmail.com
Thu Aug 6 04:32:12 CEST 2015


On Thu, Aug 6, 2015 at 12:20 PM, Dan Sommers <dan at tombstonezero.net> wrote:
> Common Lisp's format string is an entire DSL, but that DSL is like
> printf in that the string describes the formatting and the remaining
> arguments to the format function provide the data, rather than the
> string naming local variables or containing expressions to be evaluated.

Lots of languages have some sort of printf-like function (Python has
%-formatting and .format() both), where the actual content comes from
additional arguments. It's the magic of having the string *itself*
stipulate where to grab stuff from that's under discussion here.

ChrisA


More information about the Python-ideas mailing list