On Mon, May 31, 2021 at 9:12 PM David Mertz <mertz@gnosis.cx> wrote:
>>> foo = "bar"
>>> eval(repr(foo)) == eval(repr(eval(repr(foo))))
True
>>> eval(repr(None)) == eval(repr(eval(repr(None))))
True
 
Let's change the behavior of the Ellipsis object slightly to have either a .__call__() or .__getitem__() method that returns itself, no matter what argument is passed.

>>> repr(...)
...[Ellipsis]
...(Ellipsis)

I don't know which looks better, but neither look terrible to me.  That would produce a more explanatory repr() while also preserving idempotence.
 
Oh... just in case I wasn't clear, `Ellipsis.__repr__()` would obviously need to be changed slightly as well along with adding .__call__() or .__getitem__() for this to work.


--
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.