[pypy-svn] r77218 - pypy/branch/fast-forward/lib_pypy

afa at codespeak.net afa at codespeak.net
Tue Sep 21 00:13:06 CEST 2010


Author: afa
Date: Tue Sep 21 00:13:05 2010
New Revision: 77218

Modified:
   pypy/branch/fast-forward/lib_pypy/struct.py
Log:
Build a list instead of a string slice so the .reverse() operation can work.


Modified: pypy/branch/fast-forward/lib_pypy/struct.py
==============================================================================
--- pypy/branch/fast-forward/lib_pypy/struct.py	(original)
+++ pypy/branch/fast-forward/lib_pypy/struct.py	Tue Sep 21 00:13:05 2010
@@ -113,7 +113,7 @@
     return ''.join(result)
 
 def unpack_float(data, index, size, le):
-    binary = data[index:index + 8]
+    binary = [data[i] for i in range(index, index + 8)]
     if le == "big":
         binary.reverse()
     unsigned = 0



More information about the Pypy-commit mailing list