Inada Naoki <songofaca...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue37102> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com