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.

Author eric.smith
Recipients eric.smith, yan12125
Date 2016-11-01.18:23:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478024622.67.0.848531208626.issue28582@psf.upfronthosting.co.za>
In-reply-to
Content
See msg279799 from issue28128, repeated here:


Seems the ^ pointer is not always correct. For example, in the function scope it's correct:

$ cat test.py 
def foo():
    s = 'C:\Program Files\Microsoft'

$ python3.7 -W error test.py
  File "test.py", line 2
    s = 'C:\Program Files\Microsoft'
           ^
SyntaxError: invalid escape sequence \P

On the other hand, top-level literals confuses the pointer:

$ cat test.py               
s = 'C:\Program Files\Microsoft'

$ python3.7 -W error test.py
  File "test.py", line 1
    s = 'C:\Program Files\Microsoft'
       ^
SyntaxError: invalid escape sequence \P

Is that expected?
History
Date User Action Args
2016-11-01 18:23:42eric.smithsetrecipients: + eric.smith, yan12125
2016-11-01 18:23:42eric.smithsetmessageid: <1478024622.67.0.848531208626.issue28582@psf.upfronthosting.co.za>
2016-11-01 18:23:42eric.smithlinkissue28582 messages
2016-11-01 18:23:42eric.smithcreate