]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Issue #14159: Fix the len() of weak containers (WeakSet, WeakKeyDictionary, WeakValue...
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 1 Mar 2012 15:28:14 +0000 (16:28 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 1 Mar 2012 15:28:14 +0000 (16:28 +0100)
commit0836baa46af9349b79976f751ac8d569cb256edf
treeeecf806dbbb66d846e869ccd7665aa1438a12c02
parentd7aff2d696bd4b0e074cb57544443e6706da9a52
parentbbe2f60b3c19ecaa02ca07be14474eaacfcb59a0
Issue #14159: Fix the len() of weak containers (WeakSet, WeakKeyDictionary, WeakValueDictionary) to return a better approximation when some objects are dead or dying.
Moreover, the implementation is now O(1) rather than O(n).
Thanks to Yury Selivanov for reporting.
Misc/NEWS