Need formatting suggestion for long strings

Robert Dailey rcdailey at
Fri Sep 5 23:34:38 CEST 2008

On Fri, Sep 5, 2008 at 3:58 PM, Eric Wertman <ewertman at> wrote:

> > I'm concerned about the formatting of the string in that I do not want
> the
> > way I split the string up in source code to affect the way the string is
> > displayed to the console. In other words, in source, if I break up a
> single
> > string into multiple lines (using carriage returns), I would expect the
> > string to still render as a single-line string.
> >
> > I'm also concerned about the source formatting, because I do not want the
> > single-line string to run off the edge of my display. I want it to be in
> > "Paragraph form" in the source code, but remain a single-line when
> printed.
> I think you can also escape the line breaks:
> <snip>

This does not fully work because I like to add tabs to the front of the
string on each line to keep it aligned with the current tab depth of that
particular line of code. These strings will not always be in global
namespace. The tabs in the front of the string would actually be included as
part of the string, which I do not want.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list