commit | bbe2f60b3c19ecaa02ca07be14474eaacfcb59a0 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Thu Mar 01 16:26:35 2012 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Thu Mar 01 16:26:35 2012 +0100 |
tree | 768a0d9c5d1402c0d91dcaf9597e83adea6d892a | |
parent | eb977dac9cfd590982d08d1a9f7bae58498648ca [diff] |
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.