Whatever happened to String Interpolation?

Fernando Pérez fperez528 at yahoo.com
Sat Dec 1 02:30:24 CET 2001


Tim Hammerquist wrote:


> 
>> In fact, things like 'blah %(var)s' to me look a lot less readable
>> (and line noise like, perl-like, whatever) than 'blah $var'. Or is
>> it that in Python there's such a rabid fear of $ as to not even
>> admit a case where something like it may be useful?
> 
> It's possible.

Good! Maybe we are getting somewhere after all... :-)

I know I can always use itpl, but it's just that it would be so much 
cleaner to write
print $'.....$....'

than the current
print itpl('......')

I hate extra function calls which just clutter things out. I'm a big 
fan of 'first level' code readability: code which in a first reading, 
with minimal mental gymnastics, shows its intended purpose.

Oh well. We'll see if this gets anywhere. It would be nice to hear 
from Ping, I wonder if he's around in this group.

Cheers,

f



More information about the Python-list mailing list