Nick Coghlan <ncogh...@gmail.com> added the comment:
I agree with Steven and Raymond on this one: changing __repr__ on ranges in a way that breaks round-tripping through eval would be problematic, especially as I'd expect that to be an issue in doctests as well. However, I also like the idea of having easier access to a more list-like representation that shows the actual range endpoints, not just the inputs used to calculate them, and like Steven, I'm more comfortable with changing __str__ than I am with changing __repr__. That would give: >>> range(10) range(0, 10) >>> print(range(10)) <range object: [0, 1, ..., 8, 9]> ---------- nosy: +ncoghlan _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35200> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com