Closed tchaikov closed 2 months ago
Python complains at seeing
re.compile(r'^\s*BEGIN\s+[a-zA-Z]*\s*BATCH', re.UNICODE)
<>:1: SyntaxWarning: invalid escape sequence '\s'
but the interpreter continues on, and take "\s" as it is without escaping it. still, it's not a valid string literal.
because "\s" is not an escape sequence, while "\s" is, but we don't have to escape "\" here, we can just use the raw string. simpler this way.
in this change, we trade the invalid escape sequence with a raw string to silence this warning.
@Lorak-mmk hi Karol, could you help review this change?
it's funny, I've run into this today (but didn't had time to chase it), thanks @tchaikov
@fruch hi Israel, could you help merge this change?
Python complains at seeing
but the interpreter continues on, and take "\s" as it is without escaping it. still, it's not a valid string literal.
because "\s" is not an escape sequence, while "\s" is, but we don't have to escape "\" here, we can just use the raw string. simpler this way.
in this change, we trade the invalid escape sequence with a raw string to silence this warning.