Return an iterator that yields the weak references to the values. The references are not guaranteed to be 'live' at the time they are used, so the result of calling the references needs to be checked before being used. This can be used to avoid creating references t
(self)
| 184 | __iter__ = keys |
| 185 | |
| 186 | def itervaluerefs(self): |
| 187 | """Return an iterator that yields the weak references to the values. |
| 188 | |
| 189 | The references are not guaranteed to be 'live' at the time |
| 190 | they are used, so the result of calling the references needs |
| 191 | to be checked before being used. This can be used to avoid |
| 192 | creating references that will cause the garbage collector to |
| 193 | keep the values around longer than needed. |
| 194 | |
| 195 | """ |
| 196 | yield from self.data.copy().values() |
| 197 | |
| 198 | def values(self): |
| 199 | for wr in self.data.copy().values(): |