mirror of
https://github.com/python/cpython.git
synced 2025-09-01 14:38:00 +00:00
Fix bug when the replacement template is a callable object
This commit is contained in:
parent
ea34a84e54
commit
e8d52af54b
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ def _expand(match, template):
|
||||||
def _subn(pattern, template, string, count=0):
|
def _subn(pattern, template, string, count=0):
|
||||||
# internal: pattern.subn implementation hook
|
# internal: pattern.subn implementation hook
|
||||||
if callable(template):
|
if callable(template):
|
||||||
filter = callable
|
filter = template
|
||||||
else:
|
else:
|
||||||
# FIXME: prepare template
|
# FIXME: prepare template
|
||||||
def filter(match, template=template):
|
def filter(match, template=template):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue