This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: An Advice on Turning Ellipsis into Keyword
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.8
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: Alex-Python-Programmer, josh.r, serhiy.storchaka
Priority: normal Keywords:

Created on 2020-08-28 03:53 by Alex-Python-Programmer, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg376018 - (view) Author: Alex (Alex-Python-Programmer) Date: 2020-08-28 03:53
In early versions of python,  programmers can simply swap True and False by
>>> True, False = False, True
Then True and False and None become keywords so programmers can't change their value.
... is also a keyword, but Ellipsis is not. So the code below is right:

>>> Ellipsis = 1
>>> print(Ellipsis)
1

If Ellipsis become a keyword, this will be better.
msg376020 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2020-08-28 06:10
You can do the same thing to replace int, float, dict, len, and all the other built-in classes and functions. Why is Ellipsis so special that it needs protection, especially when, as you note, ... is an available unoverrideable way to refer to it? Making new keywords is a high bar (because it can break existing code). What justifies this one beyond "don't want folks to mess with a barely used name"?
msg376021 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-08-28 07:04
There is Ellipsis class in the ast module. Although it is deprecated now. But I there may be Ellipsis names also in third-party libraries. Making Ellipsis a keyword would break them.
msg376034 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2020-08-28 12:15
I'm closing this as not being worth the costs of adding new keywords. You're welcome to propose it on the python-ideas list (a more appropriate place to propose and suss out the details of significant language changes), but you'll need to formulate a much stronger reason for making this change.
History
Date User Action Args
2022-04-11 14:59:35adminsetgithub: 85818
2020-08-28 12:15:46josh.rsetstatus: open -> closed
resolution: rejected
messages: + msg376034

stage: resolved
2020-08-28 07:04:10serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg376021
2020-08-28 06:10:13josh.rsetnosy: + josh.r
messages: + msg376020
2020-08-28 03:53:22Alex-Python-Programmercreate