[Python-ideas] Syntax for dedented strings

Ben Finney ben+python at benfinney.id.au
Wed Aug 17 01:55:45 CEST 2011


Michael Foord <fuzzyman at gmail.com> writes:

> The place I'm concerned about is the interactive interpreter,
> virtually the only place I look at docstrings that isn't directly in
> the source code (or pre-processed by a doc tool - but I don't care
> about that).

Right, and the interactive interpreter's ‘help’ follows the PEP 257
specification for handling whitespace in docstrings. If it doesn't, I'd
consider that a bug to be fixed.

On the other hand, if you're doing things like ‘print foo.__doc__’, I
don't think we need to do anything special to support that. You have
‘help’ available in the interpreter to nicely format an object's
docstrings, right?

-- 
 \           “Let others praise ancient times; I am glad I was born in |
  `\                                      these.” —Ovid (43 BCE–18 CE) |
_o__)                                                                  |
Ben Finney




More information about the Python-ideas mailing list