Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
Currently, this code raises the following error:
>>> "asdf\" File "<stdin>", line 1 "asdf\" ^SyntaxError: unterminated string literal (detected at line 1)Maybe there's room to make this error message more helpful, to make the source of the error more obvious for users unfamiliar with escapes. Could the following be better?
>>> "asdf\" File "<stdin>", line 1 "asdf\" ^SyntaxError: unterminated string literal (detected at line 1); perhaps you escaped the end quote?(The raw string situation in the linked issues that inspired this is a little extra tricky, since the workaround is still not clear. But hopefully the message still makes it clearer to users what is going on)