Author emilyemorehouse
Recipients Julian, emilyemorehouse, georg.brandl, martin.panter, terry.reedy
Date 2017-06-27.01:27:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1498526871.53.0.897764498609.issue30754@psf.upfronthosting.co.za>
In-reply-to
Content
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'
History
Date User Action Args
2017-06-27 01:27:51emilyemorehousesetrecipients: + emilyemorehouse, georg.brandl, terry.reedy, Julian, martin.panter
2017-06-27 01:27:51emilyemorehousesetmessageid: <1498526871.53.0.897764498609.issue30754@psf.upfronthosting.co.za>
2017-06-27 01:27:51emilyemorehouselinkissue30754 messages
2017-06-27 01:27:51emilyemorehousecreate