Technically, any odd number of backslashes, as described in the documentation.
>>> r\'\\\'
File \"\", line 1
r\'\\\'
^
Syn
Comming from C it pretty clear to me that a single \ works as escape character allowing you to put special characters such as newlines, tabs and quotes into strings.
That does indeed disallow \ as last character since it will escape the " and make the parser choke. But as pointed out earlier \ is legal.