Monday, November 15, 2004

ASPN : Python Cookbook : Easy string interpolation in Python 2.4

ASPN : Python Cookbook : Easy string interpolation in Python 2.4
A great new string interpolation recipe for python by Michael Simionato.
It's the little things...
language="Python"

def printmsg():
opinion = "favorite"
print interp("My $opinion language is $language.")
Discussion:
This is the way I always wanted string interpolation to work.

Me too