This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: raw strings SyntaxError
Type: behavior Stage: resolved
Components: Versions: Python 3.9, Python 3.8
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: anmikf, eric.smith, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2020-12-09 03:18 by anmikf, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg382785 - (view) Author: 安迷 (anmikf) Date: 2020-12-09 03:18
[test@test ~]# python3 -c 'print(r"\n")'
[test@test ~]# python3 -c 'print(r"n\")'
  File "<string>", line 1
SyntaxError: EOL while scanning string literal
msg382786 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-12-09 04:16
This is a FAQ:

Raw strings can't end with an odd number of backslashes.
Date User Action Args
2022-04-11 14:59:39adminsetgithub: 86773
2020-12-09 04:16:03eric.smithsetstatus: open -> closed

components: - Windows

nosy: + eric.smith
messages: + msg382786
resolution: not a bug
stage: resolved
2020-12-09 03:18:11anmikfcreate