The name Ellipsis should be a constant
31 May
2021
31 May
'21
2:37 p.m.
In Python `...` is referred to as `Ellipsis` and cannot be assigned to. Yet, one can assign any value to the name `Ellipsis`. Consider the following: ```
... Ellipsis ... == Ellipsis True Ellipsis Ellipsis Ellipsis = 3 Ellipsis 3 ... = 4 File "<stdin>", line 1 ... = 4 ^ SyntaxError: cannot assign to Ellipsis # But I just did assign a new value to the name Ellipsis above. Ellipsis 3 ... Ellipsis ... == Ellipsis False
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.
André Roberge
1031
Age (days ago)
1032
Last active (days ago)
33 comments
14 participants
participants (14)
-
André Roberge
-
Brendan Barnwell
-
Chris Angelico
-
Christopher Barker
-
David Mertz
-
Filipe Laíns
-
Guido van Rossum
-
Jelle Zijlstra
-
Jonathan Fine
-
MRAB
-
Paul Bryan
-
Serhiy Storchaka
-
Simão Afonso
-
Steven D'Aprano