Message282432
> Now about __len__() returning a wrong result: it is a more complicated issue, I fear. I already patched weakref.py inside PyPy in order to pass a unit test inside CPython's test suite. This patch is to change __len__ to look like this: [...]
Thanks for the explanation. Yes, you are right on the principle. But there is also a general expectation that len() on an in-memory container is a O(1) operation, not O(n) - this change would break that expectation quite heavily.
I don't know how to fix len() without losing O(1) performance. It seems we're in a bit of a quandary on this topic. However, we can still fix the other issues. |
|
Date |
User |
Action |
Args |
2016-12-05 16:38:44 | pitrou | set | recipients:
+ pitrou, tim.peters, fdrake, arigo, serhiy.storchaka |
2016-12-05 16:38:44 | pitrou | set | messageid: <1480955924.11.0.985119175359.issue28427@psf.upfronthosting.co.za> |
2016-12-05 16:38:44 | pitrou | link | issue28427 messages |
2016-12-05 16:38:43 | pitrou | create | |
|