[issue37102] Automatically dedent docstring constants by default
Inada Naoki
report at bugs.python.org
Thu Jun 6 07:34:15 EDT 2019
Inada Naoki <songofacandy at gmail.com> added the comment:
How about do `inspect.cleandoc()` instead of just a dedent?
Some method has docstring like this:
"""First line
blah blah blah blah
example code here
...
"""
In such docstring, dedent can not strip indent well.
There is existing attempt (in Japanese):
https://qiita.com/hhatto/items/3da6c6820817395f2c39#%E6%84%9A%E7%9B%B4%E3%81%AB%E5%AE%9F%E8%A3%85%E3%81%97%E3%81%9F%E3%82%B3%E3%83%BC%E3%83%89
----------
nosy: +inada.naoki
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37102>
_______________________________________
More information about the Python-bugs-list
mailing list