mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
hack StringIO's repr, so it doesn't give an encoding
This commit is contained in:
parent
c4c0eaebbf
commit
9fd459a3a2
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue