[Python-ideas] String interpolation again.

INADA Naoki songofacandy at gmail.com
Fri Jul 23 14:41:21 CEST 2010

> I agree. but i wouldn't mind if python would start automatically calling str
> on objects in string sequences if they are not strings.
> i.e. turn this
> not_a_string = 123
> a_string = 'this is a string' + not_a_string
> #currently throws syntax error

Currently, this raises TypeError.
I think allowing implicit conversion break backward compatibility and
allowing new syntax that is now syntax error doesn't cause a
compatibility problem.

INADA Naoki  <songofacandy at gmail.com>

More information about the Python-ideas mailing list