summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-03-09 00:09:44 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-03-09 00:09:44 (GMT)
commit9fd459a3a2ffed7bda16a96c46d2cbca448a5867 (patch)
treedf424bf954a082d60f10699d5c03211ac811c694 /Lib
parentc4c0eaebbff47a70bcdbc97d9b57e57b977efb5d (diff)
downloadcpython-9fd459a3a2ffed7bda16a96c46d2cbca448a5867.zip
cpython-9fd459a3a2ffed7bda16a96c46d2cbca448a5867.tar.gz
cpython-9fd459a3a2ffed7bda16a96c46d2cbca448a5867.tar.bz2
hack StringIO's repr, so it doesn't give an encoding
Diffstat (limited to 'Lib')
-rw-r--r--Lib/_pyio.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index 535c9ca..771d4ce 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -1829,3 +1829,8 @@ class StringIO(TextIOWrapper):
def getvalue(self):
self.flush()
return self.buffer.getvalue().decode(self._encoding, self._errors)
+
+ def __repr__(self):
+ # TextIOWrapper tells the encoding in its repr. In StringIO,
+ # that's a implementation detail.
+ return object.__repr__(self)