Message167930
I find Stefan's proposed equality confusing. Why is it based on memcmp? Either it compares memory (i.e. internal representations), or it compares abstract values. If it compares abstract values, then it shouldn't be a requirement that the format strings are equal in any sense. Instead, the resulting values should be equal. So I propose this definition:
v == w iff v.shape() == w.shape() and v.tolist() == w.tolist()
if either operation fails with an exception, the objects are not equal
Of course, the implementation doesn't need to literally call tolist; instead, behaving as-if it had been called is fine. However, as time
is running out, I would actually propose this to be the implementation
in 3.3.
In addition, I would propose to support the 'u' and 'w' codes in tolist, to resolve what Victor says the actual issue is.
I'm -1 on a definition that involves equivalence of format strings. |
|
Date |
User |
Action |
Args |
2012-08-11 04:16:00 | loewis | set | recipients:
+ loewis, georg.brandl, mark.dickinson, ncoghlan, pitrou, vstinner, christian.heimes, Arfrever, skrah, meador.inge, python-dev |
2012-08-11 04:16:00 | loewis | set | messageid: <1344658560.61.0.165773551095.issue15573@psf.upfronthosting.co.za> |
2012-08-11 04:15:59 | loewis | link | issue15573 messages |
2012-08-11 04:15:58 | loewis | create | |
|