[New-bugs-announce] [issue40769] Pegen: cover extra surrounding parentheses for invalid annotated assignment
Batuhan Taskaya
report at bugs.python.org
Mon May 25 11:03:00 EDT 2020
New submission from Batuhan Taskaya <isidentical at gmail.com>:
$ python -X oldparser
Python 3.10.0a0 (heads/bpo-xxxxx:f2947e354c, May 21 2020, 18:54:57)
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> (()): int
File "<stdin>", line 1
SyntaxError: only single target (not tuple) can be annotated
>>> ((())): int
File "<stdin>", line 1
SyntaxError: only single target (not tuple) can be annotated
>>> (((()))): int
File "<stdin>", line 1
SyntaxError: only single target (not tuple) can be annotated
>>> ([]): int
File "<stdin>", line 1
SyntaxError: only single target (not list) can be annotated
>>> (([])): int
File "<stdin>", line 1
SyntaxError: only single target (not list) can be annotated
---- current ----
>>> (()): int
File "<stdin>", line 1
(()): int
^
SyntaxError: illegal target for annotation
>>> (((()))): int
File "<stdin>", line 1
(((()))): int
^
SyntaxError: illegal target for annotation
>>> ([]): int
File "<stdin>", line 1
([]): int
^
SyntaxError: illegal target for annotation
>>> (([])): int
File "<stdin>", line 1
(([])): int
^
SyntaxError: illegal target for annotation
----------
messages: 369885
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Pegen: cover extra surrounding parentheses for invalid annotated assignment
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40769>
_______________________________________
More information about the New-bugs-announce
mailing list