[Python-Dev] extended print statement, uPre-PEP

Ka-Ping Yee ping@lfw.org
Mon, 24 Jul 2000 02:13:42 -0700 (PDT)

On Sun, 23 Jul 2000, Paul Prescod wrote:
> As happy as I am to have it called Prescod-ese, I admit to influence
> from some languages that (otherwise) suck. :)

I agree that formatting and interpolation is one area where Perl is
much stronger, and it should be easy to do such things in Python.

> credit-where-due 'ly yrs
I kind of hate to do this, but i can't restrain myself from pointing
out that i *did* propose just this solution quite recently, in:


I wrote a module to do this a few years ago (1996, i think).  It
supported attribute lookup, item lookup, and expressions.  (No one
has yet mentioned the issue of escaping the dollar sign, which i
handled by doubling it.)

See the exact rules described, with examples, at


If you want to play, just download


and try the itpl() function in the module.

I would be quite pleased if (for example) $"" performed the
equivalent of a function call to itpl() on the enclosed string.

Apologetically (& only *gently* indignant),

-- ?!ng