This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients MLModel, georg.brandl, rhettinger, terry.reedy
Date 2009-05-14.14:13:19
SpamBayes Score 9.932746e-07
Marked as misclassified No
Message-id <1242310403.86.0.185275044361.issue5953@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-05-14 14:13:24rhettingersetrecipients: + rhettinger, georg.brandl, terry.reedy, MLModel
2009-05-14 14:13:23rhettingersetmessageid: <1242310403.86.0.185275044361.issue5953@psf.upfronthosting.co.za>
2009-05-14 14:13:22rhettingerlinkissue5953 messages
2009-05-14 14:13:20rhettingercreate