This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients Arfrever, christian.heimes, georg.brandl, loewis, mark.dickinson, meador.inge, ncoghlan, pitrou, python-dev, skrah, vstinner
Date 2012-08-10.07:48:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1344584919.64.0.468432828178.issue15573@psf.upfronthosting.co.za>
In-reply-to
Content
> I can easily provide a specification that makes the current implementation "correct"

Yes, the current specification is: memoryview only attempts to
compare arrays with known (single character native) formats and
returns "not equal" otherwise.

The problem is that for backwards compatibility memoryview accepts
arrays with arbitrary format strings. In operations like tolist()
it's possible to raise NotImplemented, but for equality comparisons
that's not possible.


Note that in 3.2 memoryview would return "equal" for arrays that
simply aren't equal, if those arrays happen to have the same bit
pattern.


One way to deal with this is to demand a strict canonical form
of format strings for PEP-3118, see msg167687.
History
Date User Action Args
2012-08-10 07:48:39skrahsetrecipients: + skrah, loewis, georg.brandl, mark.dickinson, ncoghlan, pitrou, vstinner, christian.heimes, Arfrever, meador.inge, python-dev
2012-08-10 07:48:39skrahsetmessageid: <1344584919.64.0.468432828178.issue15573@psf.upfronthosting.co.za>
2012-08-10 07:48:39skrahlinkissue15573 messages
2012-08-10 07:48:38skrahcreate