Re: Multi-line string extension

Donald Beaudry (don@vicorp.com)
Mon, 18 Apr 94 13:54:53 EDT

>>>>> On Mon, 18 Apr 1994 10:22:30 +0200, Guido.van.Rossum@cwi.nl said:

>> Sorry, but nobody's gonna convince me I care how long it takes to
>> catentate string literals. Don correctly (IMO) identified that as a
>> side "bonus" at the start (or as a cup of soup <wink>).

> Same here.

Not here... just think about how long it would take to concatenate
1000 lines of string data from inside a python program.... pretty
scary isn't it?

> So what do you think of the triple quote convention? To be specific,
> I'm thinking of the following rules. Either single or double quotes
> can be tripled to start a different kind of quoted string. Inside
> such strings, backslash escapes still work, and <backslash><newline>
> is ignored, but unescaped <newline> is kept in the string (rather than
> being an error). Sequences of 1 or 2 quotes do not terminate the
> string. A sequence of three quotes can be enclosed by quoting at
> least one of them with a backslash. There is no variable substitution
> but of course you can use a triple-quoted string as format string or
> concatenate it with a back-ticked expression.

I like it! Now, how about having triple double quotes treat the
leading white space differently than triple single quotes. One could
do the obvious WYSIWYG thing and then we could argue some more about
what to do with the other.

--Don

______ ______
\_\_\_\ /#/#/#/
\_\_\_\ ______
\_\_\_V#/#/#/ Donald Beaudry don@vicorp.com
\_\_/#/#/#/ V. I. Corporation uunet!vicorp!don
\_/#/#/#/ 47 Pleasant Street PHONE: (413) 586-4144
V#/#/#/ Northampton, MA 01060 FAX: (413) 586-3805