Message167930
| Author |
loewis |
| Recipients |
Arfrever, christian.heimes, georg.brandl, loewis, mark.dickinson, meador.inge, ncoghlan, pitrou, python-dev, skrah, vstinner |
| Date |
2012年08月11日.04:15:58 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1344658560.61.0.165773551095.issue15573@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|