Open Janim007 opened 3 years ago
python sub method always return the original value even if there was no match and replacement. to be consistent with python, this PR propose to remove checking if value hasn't changed and return the original value as it as. current behavior:
>>> re.sub(r'foo', 'bar', 'github') ''
expected behavior:
>>> re.sub(r'foo', 'bar', 'github') 'github'
python sub method always return the original value even if there was no match and replacement. to be consistent with python, this PR propose to remove checking if value hasn't changed and return the original value as it as. current behavior:
expected behavior: