[issue2603] Make range __eq__ work
Guido van Rossum
report at bugs.python.org
Sat Apr 26 00:38:40 CEST 2008
Guido van Rossum <guido at python.org> added the comment:
On Fri, Apr 25, 2008 at 3:36 PM, Benjamin Peterson
<report at bugs.python.org> wrote:
>
> Benjamin Peterson <musiccomposition at gmail.com> added the comment:
>
> Thanks for the help.
>
> Yes, after thinking for a while, I decided that range equality should
> represent the set of integers and not the values in the constructor.
> Normalization would be a good idea, but I think that's another issue
> I'll tackle after this.
The two go hand-in-hand; you shouldn't have two range() objects that
compare equal and yet have different stop attribute values.
> Now you get an error for hashing a huge range.
>
> Added file: http://bugs.python.org/file10110/range_eq8.patch
>
>
>
> __________________________________
> Tracker <report at bugs.python.org>
> <http://bugs.python.org/issue2603>
> __________________________________
>
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2603>
__________________________________
More information about the Python-bugs-list
mailing list