Fix bug when the replacement template is a callable object
authorAndrew M. Kuchling <amk@amk.ca>
Sun, 18 Jun 2000 20:27:10 +0000 (20:27 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Sun, 18 Jun 2000 20:27:10 +0000 (20:27 +0000)
Lib/sre.py

index 455cd2785e8fc894555d22d84babeadf380cf809..637b776b2ea5eff67bd665a40b4f71aaa6aee3cf 100644 (file)
@@ -90,7 +90,7 @@ def _expand(match, template):
 def _subn(pattern, template, string, count=0):
     # internal: pattern.subn implementation hook
     if callable(template):
-        filter = callable
+        filter = template
     else:
         # FIXME: prepare template
         def filter(match, template=template):