Fix bug when the replacement template is a callable object

This commit is contained in:
Andrew M. Kuchling 2000-06-18 20:27:10 +00:00
parent ea34a84e54
commit e8d52af54b
1 changed files with 1 additions and 1 deletions

View 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):