R. David Murray added the comment: Right, that isn't the invariant. Eval is the normal invariant, but not all classes *can* meet it, in which case if they can provide a repr that *can* be turned back into the value losslessly somehow, that's better than not doing so at all.
Still, changing the repr would be the best way to meet the desired invariant, if we're willing to do that. This could be the first stdlib case of a non-string having a useful __str__ if we make the __str__ still return what the current __repr__ does. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27363> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com