[pypy-issue] Issue #2898: syntax error offsets for parsing errors differ from cpython (pypy/pypy)

Ronny Pfannschmidt issues-reply at bitbucket.org
Mon Oct 1 17:24:56 EDT 2018


New issue 2898: syntax error offsets for parsing errors differ from cpython
https://bitbucket.org/pypy/pypy/issues/2898/syntax-error-offsets-for-parsing-errors

Ronny Pfannschmidt:

```
$ python -c 'abx abx'
  File "<string>", line 1
    abx abx
          ^
SyntaxError: invalid syntax
$ pypy -c 'abx abx'
  File "<module>", line 1
    abx abx
       ^
SyntaxError: invalid syntax
```

as seen by the highlighted offset, the `offset` attribute of a syntaxerror seems to differ on pypy on occasion

this came up again in https://github.com/pytest-dev/pytest/pull/4056/files#diff-69c85e38e7357573920b661de13d7502R132 - so i decided to open an issue about it here in order to figure if its ok for intent or not




More information about the pypy-issue mailing list