Author jaraco
Recipients eric.araujo, jaraco, orsenthil, pitrou, python-dev
Date 2011-07-26.16:59:41
SpamBayes Score 9.94908e-05
Marked as misclassified No
Message-id <1311699581.84.0.669105992392.issue10639@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-07-26 16:59:41jaracosetrecipients: + jaraco, orsenthil, pitrou, eric.araujo, python-dev
2011-07-26 16:59:41jaracosetmessageid: <1311699581.84.0.669105992392.issue10639@psf.upfronthosting.co.za>
2011-07-26 16:59:41jaracolinkissue10639 messages
2011-07-26 16:59:41jaracocreate