]> granicus.if.org Git - python/commit
Issue #14159: Fix the len() of weak sets to return a better approximation when some...
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 1 Mar 2012 15:26:35 +0000 (16:26 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 1 Mar 2012 15:26:35 +0000 (16:26 +0100)
commitc56bca31e9b7ac87a459a65680ee7ad454fd4f22
treefeb3b4fe1a430192589fc1332c6d1d0a3dbc53aa
parent4666ebd8fae8e115dc51b25d630481b15613e94d
Issue #14159: Fix the len() of weak sets 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.
Lib/_weakrefset.py
Lib/test/test_weakref.py
Lib/test/test_weakset.py
Misc/NEWS