Author: Konstantin Lopuhin <[email protected]>
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)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit