Message65543
| Author |
belopolsky |
| Recipients |
amaury.forgeotdarc, belopolsky, benjamin.peterson, georg.brandl, gvanrossum |
| Date |
2008年04月16日.02:50:48 |
| SpamBayes Score |
0.10702404 |
| Marked as misclassified |
No |
| Message-id |
<d38f5330804151950h339f12e2ie62a902f85b64fb5@mail.gmail.com> |
| In-reply-to |
<1208312490.47.0.267443862116.issue2603@psf.upfronthosting.co.za> |
| Content |
On Tue, Apr 15, 2008 at 10:21 PM, Benjamin Peterson
<report@bugs.python.org> wrote:
> I'm not really sure what to do about the hash. I
> just removed the Py_SIZE parts. I hope that's OK.
If you want to maintain hash(range(a,b,c)) == hash((a,b,c)) invariant,
you need to replace len with 3, not 0. While I think your latest
implementation is ok, reproducing tuple hash will make correctness
more obvious. |
|