Author: Konstantin Lopuhin <[email protected]>
Branch: pickle-dumps
Changeset: r62359:519e4fca15cb
Date: 2013-03-15 23:22 +0400
http://bitbucket.org/pypy/pypy/changeset/519e4fca15cb/

Log:    this makes StringBuilder match StringIO on small objects, although
        it is strange

diff --git a/lib-python/2/pickle.py b/lib-python/2/pickle.py
--- a/lib-python/2/pickle.py
+++ b/lib-python/2/pickle.py
@@ -1418,9 +1418,7 @@
     '''
     def __init__(self):
         self.builder = StringBuilder()
-
-    def write(self, data):
-        self.builder.append(data)
+        self.write = self.builder.append
 
     def getvalue(self):
         return self.builder.build()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to