[Python-ideas] String interpolation again.
songofacandy at gmail.com
Fri Jul 23 19:35:29 CEST 2010
> What's wrong with
> s = 'foo' + str(bar) + 'baz'
OK, I agree that your code is very pythonic.
I've seen and wrote some PHP and Ruby code today, so I've forgotten
Many people from PHP/Ruby/Perl look at string interpolation and find
.format(**vars()) trick and feel it's messy.
But if there is a clean and pythonic way, adding new syntax is not pythonic.
> If you want something Pythonic:
> import this
> Explicit is better than implicit
INADA Naoki <songofacandy at gmail.com>
More information about the Python-ideas