[issue13857] Add textwrap.indent() as counterpart to textwrap.dedent()

Nick Coghlan report at bugs.python.org
Wed Jan 25 11:17:34 CET 2012


Nick Coghlan <ncoghlan at gmail.com> added the comment:

David Miller pointed out a shorter spelling:

    s.replace('\n', '\n' + (4 * ' '))

Still not particularly obvious to the reader (or writer), though.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13857>
_______________________________________


More information about the Python-bugs-list mailing list