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 mystor
Recipients mystor
Date 2015-11-20.05:50:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1447998656.06.0.471632717786.issue25677@psf.upfronthosting.co.za>
In-reply-to
Content
It appears that syntax errors generated by checking the AST will get confused by indentation and place the caret incorrectly.

With no indentation:
===
1 + 1 = 2
===
  File "/Users/mlayzell/test.py", line 1
    1 + 1 = 2
    ^
SyntaxError: can't assign to operator
===

With 4 spaces of indentation:
===
if True:
    1 + 1 = 2
===
  File "/Users/mlayzell/test.py", line 2
    1 + 1 = 2
       ^
SyntaxError: can't assign to operator
===

As you can see, the caret appears to be placed randomly in the middle of the second statement, apparently offset (probably by the 4 space indentation).

The above examples were run with Python3.5 on Mac OS X 10.10.4, though my somewhat-recent trunk clone exhibits the same problems.
History
Date User Action Args
2015-11-20 05:50:56mystorsetrecipients: + mystor
2015-11-20 05:50:56mystorsetmessageid: <1447998656.06.0.471632717786.issue25677@psf.upfronthosting.co.za>
2015-11-20 05:50:55mystorlinkissue25677 messages
2015-11-20 05:50:55mystorcreate