diff options
author | Guido van Rossum <guido@python.org> | 2007-08-29 18:31:16 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-29 18:31:16 (GMT) |
commit | e86254e2560250ce958330433488ba092ca8ffea (patch) | |
tree | a9493cfbe89e9a344e25ecbf8f6526c199a552cb /Lib | |
parent | 5f7b087f6685e1f5ee1815781566834d62831982 (diff) | |
download | cpython-e86254e2560250ce958330433488ba092ca8ffea.zip cpython-e86254e2560250ce958330433488ba092ca8ffea.tar.gz cpython-e86254e2560250ce958330433488ba092ca8ffea.tar.bz2 |
In rseponse to bug# 1029, force the newline default for StringIO to "\n",
so that even on Windows, after s.write("x\n"), s.getvalue() == "x\n".
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/io.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1390,7 +1390,7 @@ class StringIO(TextIOWrapper): # XXX This is really slow, but fully functional - def __init__(self, initial_value="", encoding="utf-8", newline=None): + def __init__(self, initial_value="", encoding="utf-8", newline="\n"): super(StringIO, self).__init__(BytesIO(), encoding=encoding, newline=newline) |