[Python-checkins] r70252 - python/branches/py3k/Lib/_pyio.py

benjamin.peterson python-checkins at python.org
Mon Mar 9 01:09:44 CET 2009


Author: benjamin.peterson
Date: Mon Mar  9 01:09:44 2009
New Revision: 70252

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

Modified:
   python/branches/py3k/Lib/_pyio.py

Modified: python/branches/py3k/Lib/_pyio.py
==============================================================================
--- python/branches/py3k/Lib/_pyio.py	(original)
+++ python/branches/py3k/Lib/_pyio.py	Mon Mar  9 01:09:44 2009
@@ -1829,3 +1829,8 @@
     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)


More information about the Python-checkins mailing list