I think making 'Ellipsis' a reserved word is too much. The analogy with non-reserved words like `int`, `str`, `map`, `print`, and so on, illustrate this, I think. I.e. redefining those is likely to cause bad things to happen, but we're consenting adults, and in the end they are just names. However, I think improving the repr() of the Ellipsis object itself to remind users of the connection with its special literal `...` is a great idea. On Mon, May 31, 2021 at 3:27 PM André Roberge <andre.roberge@gmail.com> wrote:
On Mon, May 31, 2021 at 4:17 PM Serhiy Storchaka <storchaka@gmail.com> wrote:
31.05.21 17:37, André Roberge пише:
For consistency, `Ellipsis` (the name) should **always** refer to the same object that `...` refers to, so that both could not be assigned a new value.
Making Ellipsis a keyword will break ast.Ellipsis (and maybe some third-party libraries).
I realized that after my initial post which is why I subsequently suggested that its repr should perhaps be "Ellipsis (...)". But, I admit, it is a rather obscure corner case that few, if any beginners would encounter and be confused by the error message.
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/4K47SC... Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/KYIOVH... Code of Conduct: http://python.org/psf/codeofconduct/
-- The dead increasingly dominate and strangle both the living and the not-yet born. Vampiric capital and undead corporate persons abuse the lives and control the thoughts of homo faber. Ideas, once born, become abortifacients against new conceptions.