[issue10186] Invalid SyntaxError pointer offset

Stefan Krah report at bugs.python.org
Thu Oct 28 22:11:41 CEST 2010


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

Hi, I've problems with two recent commits (r85814 and r85817):


Example:

r85812 is ok:
==============

Python 3.2a3+ (py3k:85812:85835M, Oct 28 2010, 22:02:19) 
[GCC 4.2.4 (Ubuntu 4.2.4-3ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = 5 | 4 |
  File "<stdin>", line 1
    x = 5 | 4 |
              ^
SyntaxError: invalid syntax
>>> 



r85814 does not give the intended output:
==========================================

Python 3.2a3+ (py3k:85814:85835M, Oct 28 2010, 22:03:06) 
[GCC 4.2.4 (Ubuntu 4.2.4-3ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = 5 | 4 |
  File "<stdin>", line 1
    
    ^
SyntaxError: invalid syntax
>>> 


r85817 goes into an "infinite" loop. The last one is obvious;
offset is 0, so the while loop does not stop.

----------
nosy: +skrah

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10186>
_______________________________________


More information about the Python-bugs-list mailing list