On Mon, May 31, 2021 at 9:12 PM David Mertz email@example.com wrote:
foo = "bar"
eval(repr(foo)) == eval(repr(eval(repr(foo))))
eval(repr(None)) == eval(repr(eval(repr(None))))
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.
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.