This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients arigo, fdrake, pitrou, serhiy.storchaka, tim.peters
Date 2016-12-05.16:38:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480955924.11.0.985119175359.issue28427@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2016-12-05 16:38:44pitrousetrecipients: + pitrou, tim.peters, fdrake, arigo, serhiy.storchaka
2016-12-05 16:38:44pitrousetmessageid: <1480955924.11.0.985119175359.issue28427@psf.upfronthosting.co.za>
2016-12-05 16:38:44pitroulinkissue28427 messages
2016-12-05 16:38:43pitroucreate