[New-bugs-announce] [issue40067] Improve error messages for multiple star expressions in assignment

Furkan Önder report at bugs.python.org
Wed Mar 25 16:26:27 EDT 2020


New submission from Furkan Önder <furkanonder at protonmail.com>:

Hello everyone,

>>> a,*b,*c,*d = range(4)
  File "<stdin>", line 1
SyntaxError: two starred expressions in assignment
>>> 

>>> a,*b,*c,*d,*e = range(5)
  File "<stdin>", line 1
SyntaxError: two starred expressions in assignment
>>> 

I think this error message is incomplete. It states that there are two starred assignments but there are more. It might be better if we change it to something less vague like "SyntaxError: more than one starred expressions in assignment."

----------
components: Interpreter Core
messages: 365023
nosy: BTaskaya, furkanonder
priority: normal
severity: normal
status: open
title: Improve error messages for multiple star expressions in assignment
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40067>
_______________________________________


More information about the New-bugs-announce mailing list