[issue7913] Enhance Cmd support for docstrings and document it.

2017-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can you create a pull request David? -- nosy: +serhiy.storchaka versions: +Python 3.7 -Python 3.3 ___ Python tracker ___ __

[issue7913] Enhance Cmd support for docstrings and document it.

2011-03-20 Thread Éric Araujo
Éric Araujo added the comment: You can apply the patch (which includes tests) and edit the code of cmd.py to use cleandoc. -- versions: +Python 3.3 -Python 3.2 ___ Python tracker __

[issue7913] Enhance Cmd support for docstrings and document it.

2011-03-20 Thread Daniel Urban
Daniel Urban added the comment: inspect.cleandoc (which is also used by inspect.getdoc and pydoc.getdoc) seems to do a similar thing. Maybe that could be used for this? -- nosy: +durban ___ Python tracker ___

[issue7913] Enhance Cmd support for docstrings and document it.

2010-03-27 Thread Éric Araujo
Éric Araujo added the comment: > The problem with using textwrap is that you'd have to identify paragraph > boundaries > and example code to avoid messing up the meaning of the doc string. I thought dedent just worked. Can you provide a simple example to help me understand this problem? Does

[issue7913] Enhance Cmd support for docstrings and document it.

2010-03-27 Thread R. David Murray
R. David Murray added the comment: The problem with using textwrap is that you'd have to identify paragraph boundaries and example code to avoid messing up the meaning of the doc string. At that point, one might as well go for full ReST markup parsing, and I don't think that is appropriate :

[issue7913] Enhance Cmd support for docstrings and document it.

2010-03-27 Thread Éric Araujo
Éric Araujo added the comment: Hello This would be a nice improvement. This weakness is indeed mentioned on PyMotW. How about using textwrap.dedent? Regards -- nosy: +merwok ___ Python tracker __

[issue7913] Enhance Cmd support for docstrings and document it.

2010-02-11 Thread R. David Murray
New submission from R. David Murray : Cmd currently has undocumented support for using the docstrings of 'do_' methods as the documentation for those methods. This is a very convenient facility, except that it leads to documentation being printed with a lot of leading whitespace. I propose t