Message288661
I noticed the issue is still there in Python 3.6.
But I can't see why array subclasses should be the reason for this implementation.
By looking at getarrayitem, it looks like __getitem__ does not play any role in how the elements are accessed.
Consider the attached example, where SubclassedArray.__getitem__ is overridden to always return 0: nonetheless, equality checks with an array.array containing the same elements always succeed.
> For cases where the signedness and element size are identical, it's trivial to acquire readonly buffers for both arrays and directly compare the memory
I would argue that _integerness_ sholud also be identical: otherwise
array("l", range(10)) == array("f", range(10))
would evaluate to False, while it is True in the current implementation. |
|
Date |
User |
Action |
Args |
2017-02-27 18:35:02 | lou1306 | set | recipients:
+ lou1306, josh.r, swanson |
2017-02-27 18:35:02 | lou1306 | set | messageid: <1488220502.36.0.00274765839622.issue24700@psf.upfronthosting.co.za> |
2017-02-27 18:35:02 | lou1306 | link | issue24700 messages |
2017-02-27 18:35:02 | lou1306 | create | |
|