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

R. David Murray report at bugs.python.org
Tue May 29 16:21:29 CEST 2012


R. David Murray <rdmurray at bitdance.com> added the comment:

Why would you expect it to?

>>> 'a\nb'.splitlines()
['a', 'b']
>>> 'a\nb\n'.splitlines()
['a', 'b']
>>> 'a\nb\n\n'.splitlines()
['a', 'b', '']

That's exactly what I would intuitively expect, and I don't see how it could possibly do anything else.

----------
nosy: +r.david.murray

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


More information about the Python-bugs-list mailing list