New submission from Serhiy Storchaka <[email protected]>:
Some users can be confused by syntax error message for assigning to ellipsis
[1]:
>>> ... = 1
File "<stdin>", line 1
... = 1
^^^
SyntaxError: cannot assign to Ellipsis here. Maybe you meant '==' instead of
'='?
because Ellipsis is a name of a builtin variable Ellipsis, and it is possible
to assign to variable named Ellipsis.
>>> Ellipsis = 1
>>> Ellipsis
1
I think that using lowercase spelling of "ellipsis" will eliminate confusion.
[1]
https://mail.python.org/archives/list/[email protected]/thread/KDQ3OHALLXVZJIGPC4BMPVS2XH3VFPJV/
----------
components: Interpreter Core
messages: 394849
nosy: pablogsal, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Improve syntax error message for assigning to "..."
type: enhancement
versions: Python 3.11
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue44278>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com