[New-bugs-announce] [issue15814] memoryview: equality-hash invariant

Stefan Krah report at bugs.python.org
Wed Aug 29 19:07:09 CEST 2012


New submission from Stefan Krah:

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
>>>

----------
assignee: skrah
messages: 169398
nosy: Arfrever, christian.heimes, georg.brandl, haypo, loewis, mark.dickinson, meador.inge, ncoghlan, pitrou, skrah
priority: normal
severity: normal
stage: needs patch
status: open
title: memoryview: equality-hash invariant
type: behavior
versions: Python 3.4

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


More information about the New-bugs-announce mailing list