[issue10639] reindent.py should not convert newlines
Jason R. Coombs
report at bugs.python.org
Tue Jul 26 18:59:41 CEST 2011
Jason R. Coombs <jaraco at jaraco.com> added the comment:
What do you think about this: https://bitbucket.org/jaraco/cpython-issue10639/changeset/ea63310dddce
The patch is a little more intrusive than the Python 3 patch because Python 2.7 doesn't allow specifying the newline to use when writing a file (afaict), but it abstracts that intrusiveness in the NewlineAdapter class.
I've tested the script on a file with mixed newlines, a file with non-native newlines, and a file with content but no newlines, and it performs as expected.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10639>
_______________________________________
More information about the Python-bugs-list
mailing list