Sorry for the double post; I forgot one thing: On Thu, 10 Feb 2005 10:43:28 -0500, Bill Mill <[EMAIL PROTECTED]> wrote: > Jeff, > > I get the impression that many pythonistas don't like string > interpolation. I've never seen a clear definition of why. Anyway, it's > easy enough to add with the Itpl [1] module: > > >>> import Itpl, sys > >>> sys.stdout = Itpl.filter() > >>> s, n, r = 0, 0, 0 > >>> print "$s $n $r" > 0 0 0 > >>> x = Itpl.itpl("$s $n $r") > >>> x > '0 0 0' >
This works with arbitrary data types too, to be truer to your example: >>> s, n, r = '0', 12, 3.4 >>> x = Itpl.itpl("$s $n $r") >>> x '0 12 3.4' Peace Bill Mill bill.mill at gmail.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor