diff options
| author | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-06-12 21:20:23 (GMT) |
|---|---|---|
| committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-06-12 21:20:23 (GMT) |
| commit | dd0b90a367f4c04a0d2b210f59a29a2eb2200fec (patch) | |
| tree | 8cd6d7ff2695f46488eb36d1f12070e1e2240bb2 | |
| parent | d97d1fdc6097441f120b248ecbc2646045f6f277 (diff) | |
| download | cpython-dd0b90a367f4c04a0d2b210f59a29a2eb2200fec.zip cpython-dd0b90a367f4c04a0d2b210f59a29a2eb2200fec.tar.gz cpython-dd0b90a367f4c04a0d2b210f59a29a2eb2200fec.tar.bz2 | |
Fix issue #6127: Make universal newlines mode of io.StringIO not
duplicate newlines under Windows (see also issue #5265 and #5645).
| -rw-r--r-- | Lib/io.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1852,6 +1852,10 @@ class StringIO(TextIOWrapper): encoding=encoding, errors=errors, newline=newline) + # Issue #5645: make universal newlines semantics the same as in the + # C version, even under Windows. + if newline is None: + self._writetranslate = False if initial_value: if not isinstance(initial_value, unicode): initial_value = unicode(initial_value) |
