[issue13857] Add textwrap.indent() as counterpart to textwrap.dedent()
Ezra Berch
report at bugs.python.org
Tue Jan 31 01:03:48 CET 2012
Ezra Berch <ezraberch at mac.com> added the comment:
I've created a patch using the conditional expression in msg151945. The one problem I found with it is that when the input string is terminated by a newline it removes that newline.
I've added an optional third argument: a function which determines which lines are indented. If omitted, the default behavior is to indent non-empty lines.
----------
keywords: +patch
nosy: +ezberch
Added file: http://bugs.python.org/file24374/indent.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13857>
_______________________________________
More information about the Python-bugs-list
mailing list