<p>+1 for strings in unit tests, but not so useful for docstrings. But the proposal was as a new string type, not necessarily docstrings. But maybe a string method would be better:</p>
<p>>>> """<br>
...    This<br>
...    is<br>
...    indented.""".deindent()<br>
"""<br>
This<br>
is<br>
indented"""</p>
<p>On Aug 19, 2011 2:55 PM, "Dag Odenhall" <<a href="mailto:dag.odenhall@gmail.com">dag.odenhall@gmail.com</a>> wrote:<br>
><br>
> On Tue, 2011-08-16 at 23:43 +0100, Michael Foord wrote:<br>
> > The place I'm concerned about is the interactive interpreter, virtually the<br>
> > only place I look at docstrings that isn't directly in the source code (or<br>
> > pre-processed by a doc tool - but I don't care about that).<br>
><br>
> Why don't you use bpython? It shows the docstring automatically as<br>
> you're typing a class, without all the methods, and properly formatted.<br>
><br>
> Also if you're working with docstrings yourself there's inspect.getdoc<br>
> which handles whitespace/indentation.<br>
><br>
> (But I still consider your proposal useful.)<br>
><br>
><br>
> _______________________________________________<br>
> Python-ideas mailing list<br>
> <a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
> <a href="http://mail.python.org/mailman/listinfo/python-ideas">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
</p>