Amaury Forgeot d'Arc added the comment:
Here is a new version of the class, which removes the 'newline' argument
from the constructor.
I also removed the 'encoding' argument, since this is really an
implementation detail of the underlying buffer.
Index: Lib/io.py
===================================================================
--- Lib/io.py (revision 57564)
+++ Lib/io.py (working copy)
@@ -1390,10 +1390,10 @@
# XXX This is really slow, but fully functional
- def __init__(self, initial_value="", encoding="utf-8", newline=None):
+ def __init__(self, initial_value=""):
super(StringIO, self).__init__(BytesIO(),
- encoding=encoding,
- newline=newline)
+ encoding="utf-8",
+ newline='\n')
if initial_value:
if not isinstance(initial_value, basestring):
initial_value = str(initial_value)
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1029>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com