[pypy-commit] pypy default: test passes, but fix looks like an awful hack
kostialopuhin
noreply at buildbot.pypy.org
Fri Oct 26 10:50:10 CEST 2012
Author: Konstantin Lopuhin <kostia.lopuhin at gmail.com>
Branch:
Changeset: r58426:63d00213f726
Date: 2012-07-20 22:11 +0400
http://bitbucket.org/pypy/pypy/changeset/63d00213f726/
Log: test passes, but fix looks like an awful hack
diff --git a/pypy/objspace/std/bytearrayobject.py b/pypy/objspace/std/bytearrayobject.py
--- a/pypy/objspace/std/bytearrayobject.py
+++ b/pypy/objspace/std/bytearrayobject.py
@@ -81,6 +81,9 @@
data = makebytearraydata_w(space, w_source)
w_bytearray.data = data
+def float__Bytearray(space, w_bytearray):
+ return space.wrap(float(''.join(w_bytearray.data)))
+
def len__Bytearray(space, w_bytearray):
result = len(w_bytearray.data)
return wrapint(space, result)
More information about the pypy-commit
mailing list