Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

On Wed, Apr 16, 2008 at 3:40 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote:
..
>  Why would you want to have hash(range(a,b,c)) == hash((a,b,c)) ?

No particular reason other than that this is easy to test and gives
some assurance that hash values are reasonable.

>  It'd be more logical to have hash(range(a,b,c)) ==
>  hash(tuple(range(a,b,c))) ... which is not the same thing at all :)

No, this is not correct because range(..) == range(..) is not the same
as tuple(range(..)) == tuple(range(..)) in the proposed
implementation.  See Guido's example above and Benjamin's test case in
the eq5 patch.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2603>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to