Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e8d52af

Browse files
committed
Fix bug when the replacement template is a callable object
1 parent ea34a84 commit e8d52af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/sre.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def _expand(match, template):
9090
def _subn(pattern, template, string, count=0):
9191
# internal: pattern.subn implementation hook
9292
if callable(template):
93-
filter = callable
93+
filter = template
9494
else:
9595
# FIXME: prepare template
9696
def filter(match, template=template):

0 commit comments

Comments
 (0)