mirror of https://github.com/python/cpython
Fix bug when the replacement template is a callable object
This commit is contained in:
parent
ea34a84e54
commit
e8d52af54b
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue