[New-bugs-announce] [issue5953] Add to "whats new": range(n) != range(n)

Mitchell Model report at bugs.python.org
Thu May 7 05:19:24 CEST 2009


New submission from Mitchell Model <mlm at acm.org>:

I just discovered to my (deep) surprise that
        range(n) != range(n)
I think that's worth including in the what's new document.
I realize that the document essentially says that in python 3 range
behaves the way xrange did in python 2 and that ranges have very little
behavior, but surely the lack of equality of two ranges whose string
representations are equal is enough of a surprise and difference from
python 2 to be worth an explicit comment. (Or maybe no-one ever compares
ranges? They are just for iteration? Even that should be said
explicitly. This is one of those things that I'm sure expert developers
look at and think is obvious but might trip up ordinary users.)

----------
assignee: georg.brandl
components: Documentation
messages: 87357
nosy: MLModel, georg.brandl
severity: normal
status: open
title: Add to "whats new": range(n) != range(n)
versions: Python 3.0, Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5953>
_______________________________________


More information about the New-bugs-announce mailing list