mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +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):
|
||||
# internal: pattern.subn implementation hook
|
||||
if callable(template):
|
||||
filter = callable
|
||||
filter = template
|
||||
else:
|
||||
# FIXME: prepare template
|
||||
def filter(match, template=template):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue