
May 31, 2021
8:41 p.m.
31.05.21 23:28, Chris Angelico пише:
Although... since that's an arbitrary placeholder, it could be changed to pretty much anything. Maybe <...> or something? The current repr may not technically be ambiguous, but it will silently do the wrong thing if you try to eval it. You can even ast.literal_eval(repr(a)) and it'll appear to work.
It was already discussed in 2015 [1], but the idea of <...> was rejected by Guido [2]. [1] https://mail.python.org/archives/list/python-ideas@python.org/thread/T2T7WR5... [2] https://mail.python.org/archives/list/python-ideas@python.org/thread/RAZMTY2...