Message10586
Just missing the appropriate support so that Object#hashCode is not invoked (the hash code is defined for all objects in Java, unlike Python). Simply following the example of PyByteArray (which implements bytearray), we get the following patch:
+ @Override
+ public int hashCode()
+ return array___hash__();
+ }
+
+ @ExposedMethod
+ final int array___hash__() {
+ throw Py.TypeError(String.format("unhashable type: '%.200s'", getType().fastGetName()));
+ }
+
Just need to add a test to complete. |
|
Date |
User |
Action |
Args |
2016-01-05 04:43:55 | zyasoft | set | messageid: <1451969035.35.0.350466948433.issue2451@psf.upfronthosting.co.za> |
2016-01-05 04:43:55 | zyasoft | set | recipients:
+ zyasoft, lsenta |
2016-01-05 04:43:55 | zyasoft | link | issue2451 messages |
2016-01-05 04:43:54 | zyasoft | create | |
|