Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:
Am inclined to reject this request. We shouldn't get in the habit of documenting what functions don't do. In the past, no one seemed to have any trouble with xrange() not being comparable to itself. In the present, there are many functions that return iterators instead of lists, so the expectation for comparability will be even lower. The main problem with anti-documentation is that bringing up the topic can plant it in a reader's memory in a confusing way, "I think I read something about ranges and comparability ...". IOW, just talking about it makes it more likely that someone will be led to making a fallacious assumption. Likewise, I don't want to put in a recommendation about comparing the repr() of ranges either. The problem is that the (start,stop,step) tuples can differ but the ranges can be the same: >>> args1 = 0, 101, 5 >>> args2 = 0, 102, 5 >>> args1 == args2 False >>> list(range(*args1)) == list(range(*args2)) True Also, I'm not worried about this one because comparing the output of range() was not a common thing to do even in Py2.x. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5953> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com