Author ncoghlan
Recipients Arfrever, christian.heimes, georg.brandl, loewis, mark.dickinson, meador.inge, ncoghlan, pitrou, python-dev, skrah, vstinner
Date 2012-08-11.09:42:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CADiSq7e8SzVxhk1v0cYkABwppBJYa-tXwaOSmrSaghH+msnzZQ@mail.gmail.com>
In-reply-to <1344658560.61.0.165773551095.issue15573@psf.upfronthosting.co.za>
Content
Stefan's proposed definition is correct. Shapes define array types, format
strings define entry types, then the actual memory contents define the
value.

It's not "Stefan's definition of equivalence", it's what a statically typed
array *means*.

The 3.2 way is completely broken, as it considers arrays containing
completely different data as equal if the memory layout happens to be the
same by coincidence.

3.3 is currently also broken, as it considers arrays that *do* contain the
same values to be different.

Stefan's patch fixes that by checking the shape and format first, and
*then* checking the value. It's exactly the same as doing an instance check
in an __eq__ method.

The requirement for a canonical format is for sanity's sake: the general
equivalence classes are too hard to figure out.
History
Date User Action Args
2012-08-11 09:42:46ncoghlansetrecipients: + ncoghlan, loewis, georg.brandl, mark.dickinson, pitrou, vstinner, christian.heimes, Arfrever, skrah, meador.inge, python-dev
2012-08-11 09:42:46ncoghlanlinkissue15573 messages
2012-08-11 09:42:45ncoghlancreate