3 ms·
"String interpolation" is a term for the purpose that the string.format syntax serves.
by zahlman 1y ago
"String interpolation" is a term for the purpose that the string.format syntax serves.
- almostgotcaught 1y agono it's not - string interpolation means inlining values and such. format strings long predate string interpolation https://en.wikipedia.org/wiki/Printf https://en.wikipedia.org/wiki/Printf
- oasisaimlessly 1y agoPython 2.7 called its % operator the "string interpolation" operator[1], and it doesn't allow inline values. [1]: https://docs.python.org/2.7/library/stdtypes.html#string-formatting-operations https://docs.python.org/2.7/library/stdtypes.html#string-for...