Well, that is not the point of the repr() guideline. It is so you can understand what value you got. There are plenty of other cases where eval() of the repr silently gives something different, e.g. when the same object occurs multiple times. Neither proposal is clearer to understand.
--Guido (mobile) On Dec 26, 2015 9:59 AM, "Serhiy Storchaka" firstname.lastname@example.org wrote:
I disagree. We should not take this guideline too literally. The dots
are easily understood and nobody has been fooled by a list containing an ellipsis yet. (Also, isn't the repr of an ellipsis the string 'Ellipsis'?)
Yes, the repr of an ellipsis is the string 'Ellipsis'. But the repr of recursive list still looks as Python expression, and if somebody uses repr/eval wraparound, he will silently get wrong result instead of an error.
Python-ideas mailing list Pythonemail@example.com https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/