Closed muxator closed 10 months ago
Is this compatible with Python 2? (is the existing code? I don't know.)
Is this compatible with Python 2?
Yes, the change is compatible with python 2.7, too; in fact, this usage has been encouraged since the olden python 2.7 days (https://docs.python.org/2.7/library/re.html):
Regular expressions use the backslash character ('\') [...]. This collides with Python’s usage of the same character for the same purpose in string literals; [...]
The solution is to use Python’s raw string notation for regular expression patterns; [...] Usually patterns will be expressed in Python code using this raw string notation.
is the existing code?
Just to be on the safe side, I have run again the python tests on both python 2.7.18 and 3.12.0 on Fedora 39.
Before this change: