15 Sep
2008
15 Sep
'08
6:47 a.m.
Georg Brandl wrote:
In this case, what WeakKeyDictionary.keys() returns is not a view anyway, so using list(self.data.keys()) in the method seems like a good compromise.
I don't think that helps, because the implementation has to iterate over that to dereference the weak refs, and if that's done in Python code there's a chance for a weak ref to disappear in the process. -- Greg