[pypy-svn] r3456 - pypy/trunk/src/pypy/appspace

sanxiyn at codespeak.net sanxiyn at codespeak.net
Sun Mar 28 14:53:30 CEST 2004


Author: sanxiyn
Date: Sun Mar 28 14:53:28 2004
New Revision: 3456

Modified:
   pypy/trunk/src/pypy/appspace/sre_parse.py
Log:
re.compile works on TrivialObjSpace.

Iterating over object which define __getitem__ is broken in
TrivialObjSpace. Work around it.



Modified: pypy/trunk/src/pypy/appspace/sre_parse.py
==============================================================================
--- pypy/trunk/src/pypy/appspace/sre_parse.py	(original)
+++ pypy/trunk/src/pypy/appspace/sre_parse.py	Sun Mar 28 14:53:28 2004
@@ -132,6 +132,8 @@
         return repr(self.data)
     def __len__(self):
         return len(self.data)
+    def __iter__(self):
+        return iter(self.data)
     def __delitem__(self, index):
         del self.data[index]
     def __getitem__(self, index):


More information about the Pypy-commit mailing list