[pypy-svn] r58639 - pypy/branch/2.5-merge/pypy/module/_sre

arigo at codespeak.net arigo at codespeak.net
Mon Oct 6 14:34:16 CEST 2008


Author: arigo
Date: Mon Oct  6 14:34:16 2008
New Revision: 58639

Modified:
   pypy/branch/2.5-merge/pypy/module/_sre/app_sre.py
Log:
(iko, arigo)
These helpers moved to another module.


Modified: pypy/branch/2.5-merge/pypy/module/_sre/app_sre.py
==============================================================================
--- pypy/branch/2.5-merge/pypy/module/_sre/app_sre.py	(original)
+++ pypy/branch/2.5-merge/pypy/module/_sre/app_sre.py	Mon Oct  6 14:34:16 2008
@@ -75,8 +75,8 @@
         filter = repl
         if not callable(repl) and "\\" in repl:
             # handle non-literal strings ; hand it over to the template compiler
-            import sre
-            filter = sre._subx(self, repl)
+            import re
+            filter = re._subx(self, repl)
         state = _sre._State(string, 0, sys.maxint, self.flags)
         sublist = []
 
@@ -242,8 +242,8 @@
     def expand(self, template):
         """Return the string obtained by doing backslash substitution and
         resolving group references on template."""
-        import sre
-        return sre._expand(self.re, self, template)
+        import re
+        return re._expand(self.re, self, template)
         
     def groups(self, default=None):
         """Returns a tuple containing all the subgroups of the match. The



More information about the Pypy-commit mailing list