Closed abdnh closed 7 months ago
In some modern environments the following exception can occur:
TIMESTAMP_PATTERN = re.compile('(\d+)?:?(\d{2}):(\d{2})[.,](\d{3})') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid escape sequence '\d'
Indeed, the exception is correct, because \d is not a valid escape sequence. But this aspect is usually ignored by interpreters and had caused no exceptions, approximately till 3.11.4.
\d
The solution would be to add r literal:
r
TIMESTAMP_PATTERN = re.compile(r'(\d+)?:?(\d{2}):(\d{2})[.,](\d{3})')
Why this PR is not merged?
Hey @andruekonst apologies for having this PR seating opened there forever. It is now merged.
In some modern environments the following exception can occur:
Indeed, the exception is correct, because
\d
is not a valid escape sequence. But this aspect is usually ignored by interpreters and had caused no exceptions, approximately till 3.11.4.The solution would be to add
r
literal:Why this PR is not merged?