Kaydet (Commit) 9fd459a3 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

hack StringIO's repr, so it doesn't give an encoding

üst c4c0eaeb
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment