[Python-ideas] String interpolation again.

Masklinn masklinn at masklinn.net
Fri Jul 23 14:33:03 CEST 2010


On 2010-07-23, at 14:26 , Andrey Popp wrote:
> I think it's a form of weak typing from languages like PHP, that
> allows programmer to make huge amounts of mistakes, that are sometimes
> difficult to spot.

For what it's worth, even PHP doesn't allow this. One either has to concatenate
    "foo" . $foo . "bar"
or interpolate
    "foo${foo}bar"

The only language I am aware of which *might* let users do something along those lines (please note that I'm not even sure it's possible) would be Tcl, in which pretty much everything seems to be a string.


More information about the Python-ideas mailing list