Message99233
| Author |
r.david.murray |
| Recipients |
r.david.murray |
| Date |
2010年02月11日.18:57:18 |
| SpamBayes Score |
4.2171774e-08 |
| Marked as misclassified |
No |
| Message-id |
<1265914642.07.0.496715269242.issue7913@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 to enhance the docstring support to strip the leading whitespace from the docstring, and to document this facility. The proposed stripping algorithm is to strip a number of characters equal to the whitespace on the first non-blank line of the docstring. This means that existing docstrings, which will typically start right after the first """, will be displayed as they were previously, but that a docstring can be formatted by starting the documentation on a new line after the """, and whitespace will be properly stripped.
Patch attached with test and documentation update. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年02月11日 18:57:22 | r.david.murray | set | recipients:
+ r.david.murray |
| 2010年02月11日 18:57:22 | r.david.murray | set | messageid: <1265914642.07.0.496715269242.issue7913@psf.upfronthosting.co.za> |
| 2010年02月11日 18:57:20 | r.david.murray | link | issue7913 messages |
| 2010年02月11日 18:57:20 | r.david.murray | create |
|