[Python-ideas] String interpolation again. (original) (raw)

INADA Naoki songofacandy at gmail.com
Fri Jul 23 16:16:00 CEST 2010


Basic problem is Python doesn't provide a way to print values of expression into str like print prints to file. 'foo{bar}baz'.format(bar=bar) is a bit bessy. ’foo{bar}baz'.format(**vars()) or other technique is a bit trickey and messy.

If s = 'foo' bar 'baz' is too dirty, another Pythonic way I think of are:

-- INADA Naoki  <songofacandy at gmail.com>



More information about the Python-ideas mailing list