Message169398
| Author |
skrah |
| Recipients |
Arfrever, christian.heimes, georg.brandl, loewis, mark.dickinson, meador.inge, ncoghlan, pitrou, skrah, vstinner |
| Date |
2012年08月29日.17:07:08 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1346260029.19.0.320505643782.issue15814@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The new PEP-3118 equality definition from #15573 that is based
on element-wise comparisons breaks the equality-hash invariant:
>>> from _testbuffer import ndarray
>>> x = ndarray([1,2,3], shape=[3], format='f')
>>> y = ndarray([1,2,3], shape=[3], format='B')
>>> a = memoryview(x)
>>> b = memoryview(y)
>>> a == b
True
>>> hash(a) == hash(b)
False
>>> |
|