Emily Morehouse added the comment: I concur with Martin, whitespace is not expected to be preserved on whitespace-only lines nor even considered when finding common leading whitepace. To illustrate this, see the examples below:
The following yields the same (expected) results: > python2 -c 'from textwrap import dedent; print repr(dedent(" " * 2 + "\n" + " " * 4 + "\t\n"))' > '\n\n' And a simplified version of a test case from test_textwrap.py: > python2 -c 'from textwrap import dedent; print repr(dedent(" Foo\n \n"))' > 'Foo\n\n' ---------- nosy: +emilyemorehouse _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30754> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com