Message296983
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' |
|
Date |
User |
Action |
Args |
2017-06-27 01:27:51 | emilyemorehouse | set | recipients:
+ emilyemorehouse, georg.brandl, terry.reedy, Julian, martin.panter |
2017-06-27 01:27:51 | emilyemorehouse | set | messageid: <1498526871.53.0.897764498609.issue30754@psf.upfronthosting.co.za> |
2017-06-27 01:27:51 | emilyemorehouse | link | issue30754 messages |
2017-06-27 01:27:51 | emilyemorehouse | create | |
|