[issue42209] Incorrect line reported in syntax error

2021-12-15 Thread arian-f


arian-f  added the comment:

There are still variations of this issue in python 3.10 - the line nr is 
correct - in script attached it's line 2 (the attached script is otherwise the 
same): 

f'{ 1_a }'

resulting in:

  File "test.py", line 1
( 1_a )
   ^
SyntaxError: invalid decimal literal

or is this a different but similar bug? Can this bug be reopened or should I 
file a new bug?

> python -VV
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit 
(AMD64)]

--
nosy: +arian-f
versions: +Python 3.10 -Python 3.8
Added file: https://bugs.python.org/file50491/test.py

___
Python tracker 
<https://bugs.python.org/issue42209>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46237] Incorrect line reported in syntax error

2022-01-02 Thread arian-f


New submission from arian-f :

parsing this code results in a syntax error with an incorrect line number - 
it's always 1

f'''
{ 1_a }'''

resulting in:

  File "", line 1
( 1_a )
   ^
SyntaxError: invalid decimal literal

an analogue error occurs when parsing a file instead of stdin.

This bug looks like it's another instance of https://bugs.python.org/issue42209 
- I commented there but there was no response for two weeks - I hope it's OK to 
post a new bug.

> python -VV
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit 
(AMD64)]

--
messages: 409567
nosy: arian-f
priority: normal
severity: normal
status: open
title: Incorrect line reported in syntax error
type: behavior
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue46237>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com