(self)
| 335 | self.data[ref(key, self._remove)] = value |
| 336 | |
| 337 | def copy(self): |
| 338 | new = WeakKeyDictionary() |
| 339 | for key, value in self.data.copy().items(): |
| 340 | o = key() |
| 341 | if o is not None: |
| 342 | new[o] = value |
| 343 | return new |
| 344 | |
| 345 | __copy__ = copy |
| 346 |