
On 2022-05-28 16:03, MRAB wrote:
On 2022-05-28 13:17, Serhiy Storchaka wrote:
28.05.22 14:57, Damian Shaw пише:
That PR seems to make \' and \" not special in general right?
I think this is a more limited proposal, to only change the behavior when \ is at the end of a string, so the only behavior difference would never receiving the error "SyntaxError: EOL while scanning string literal"
In which case there should be no backwards compatibility issue.
How do you know that it is at the end of a string?
It would also affect triple-quoted strings.
Here's an idea: prefix rr ("really raw") that would treat all backslashes literally. Here's something I've just realised.
Names in Python are case-sensitive, yet the string prefixes are case-/insensitive/. Why?