Easy "here documents" ??

Keith Dart kdart at kdart.com
Sun Dec 19 12:59:58 EST 2004


Jim Hill wrote:
> I've done some Googling around on this and it seems like creating a here
> document is a bit tricky with Python.  Trivial via triple-quoted strings
> if there's no need for variable interpolation but requiring a long, long
> formatted arglist via (%s,%s,%s,ad infinitum) if there is.  So my
> question is:
> 
> Is there a way to produce a very long multiline string of output with
> variables' values inserted without having to resort to this wacky

I was thinking about this. But I can't think of any reason why you would 
want to do this in Python. What's wrong with a regular parameterized 
function?


-- 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Keith Dart <kdart at kdart.com>
    public key: ID: F3D288E4
    =====================================================================



More information about the Python-list mailing list