I would never use a quadruple quote for this if it were ever implemented.  A better precedent would be a letter prefix to the quotes similar to what we do for raw strings and bytes constants today.  m""" perhaps.

I'm -0.5 on this.

I don't think it is a necessary feature thanks to the textwrap.dedent.  But the reason I'm not -1 is that using dedent incurs runtime cost to process the larger string constant to generate the desired one.  The best way around this is to declare your large string constants at the module level where you don't need to worry about dedent at all.


On Thu, Nov 4, 2010 at 6:10 PM, Stephen J. Turnbull <stephen@xemacs.org> wrote:
Daniel da Silva writes:

 > To me, this is rather ugly because it messes up the indentation of
 > some_func(). Suppose we could have a multiline string, that when started on
 > a line indented four spaces, ignores the first four spaces on each line of
 > the literal when creating the actual string?

We do.

from textwrap import dedent
def some_func():
   x, y = process_something()

   val = dedent("""\
   """) % (x, y)

   return val

I don't think the function call is ugly enough to fix with syntax.
Python-ideas mailing list