[issue28611] Syntax error when using raw strings ending with a backslash.

2016-11-04 Thread Ned Deily
Ned Deily added the comment: To expand a bit, the "Python Language Reference" section on "String and Byte Literals" explains: "Even in a raw literal, quotes can be escaped with a backslash, but the backslash remains in the result; for example, r"\"" is a valid string literal consisting of two

[issue28611] Syntax error when using raw strings ending with a backslash.

2016-11-04 Thread Emanuel Barry
Emanuel Barry added the comment: That's how strings work, unfortunately. You can't end any string (raw or not) with an odd number of backslashes. You could do the following to get around this limitation: >>> r"C:\Folder" "\\" 'C:\\Folder\\' As a side note, please don't upload screenshots if w

[issue28611] Syntax error when using raw strings ending with a backslash.

2016-11-04 Thread Mallow
New submission from Mallow: I'm not sure if this is a bug or not but I've noticed a behavior that seems incorrect. The use of raw strings, when used for directory paths ending with a back slash (/) creates a syntax error. How to reproduce Code: print (r"C:\path\to\a\dir\" +