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. example:
>>> re.sub(r'foo', 'bar', 'github') 'github'
@Janim007 Is there a specific problem this causes in the existing code? Could you add a test for such a case?
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. example: