[pypy-svn] r42088 - pypy/dist/pypy/module/array

fijal at codespeak.net fijal at codespeak.net
Mon Apr 16 13:17:11 CEST 2007


Author: fijal
Date: Mon Apr 16 13:17:10 2007
New Revision: 42088

Modified:
   pypy/dist/pypy/module/array/app_array.py
Log:
(suggestion by armin) Solved at least one problem, but there
is still pending flow objspace test failures for
python2.5 translate.py


Modified: pypy/dist/pypy/module/array/app_array.py
==============================================================================
--- pypy/dist/pypy/module/array/app_array.py	(original)
+++ pypy/dist/pypy/module/array/app_array.py	Mon Apr 16 13:17:10 2007
@@ -24,7 +24,6 @@
 array(typecode [, initializer]) -- create a new array
 """
 import sys
-from struct import pack, unpack
 
 if sys.maxunicode == 65535:
     UNICODE_SIZE = 2
@@ -214,6 +213,7 @@
         self._fromiterable(l)
         
     def fromstring(self, s):
+        from struct import pack, unpack
         """Appends items from the string, interpreting it as an array of machine
         values, as if it had been read from a file using the fromfile()
         method)."""
@@ -266,6 +266,7 @@
         return self._data[:]
 
     def tostring(self):
+        from struct import pack, unpack
         """Convert the array to an array of machine values and return the string
         representation."""
         if self.typecode == "u":



More information about the Pypy-commit mailing list