Make `SyntaxWarning` for invalid escape sequences better reflect their intended deprecation

Shouldn’t it be (3) and (4)? Now it’s a self referential sentence.

1 Like

You can blame MS-DOS for this (and maybe even older). Windows retained the idea that a path can be drive-relative (a path starting with a slash), current-directory-relative (a path starting with a drive letter and colon), neither, or both. I’m sure this was a great feature back in the 1980s or thereabouts, but these days, it’s more just a frustration.

As GLaDOS put it: The best solution to a problem is usually the easiest one.

2 Likes

Maybe the best solution is to convince Windows to allow us to use / by default instead of \.
Then we can copy the path and use it directly.