[pypy-commit] pypy pickle-dumps: this makes StringBuilder match StringIO on small objects, although it is strange
kostialopuhin
noreply at buildbot.pypy.org
Fri Mar 15 21:08:21 CET 2013
Author: Konstantin Lopuhin <kostia.lopuhin at gmail.com>
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()
More information about the pypy-commit
mailing list