mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #6149: Fix initialization of WeakValueDictionary objects from non-empty parameters.
This commit is contained in:
parent
3b1b8072f5
commit
c06de477a3
3 changed files with 15 additions and 1 deletions
|
@ -49,7 +49,7 @@ class WeakValueDictionary(collections.MutableMapping):
|
|||
del self.data[wr.key]
|
||||
self._remove = remove
|
||||
self.data = d = {}
|
||||
d.update(*args, **kw)
|
||||
self.update(*args, **kw)
|
||||
|
||||
def __getitem__(self, key):
|
||||
o = self.data[key]()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue