Return shallow copy of dictionary. >>> dd = DefDict.fromkeys(range(5), 5) >>> ddcopy = dd.copy() >>> print ddcopy._default, isinstance(ddcopy, DefDict); print ddcopy 5 True {0: 5, 1: 5, 2: 5, 3: 5, 4: 5} >>> ddcopy[0] = 7 >>> print dd[0], ddco
(self)
| 209 | return dict.get(self, key, *args) |
| 210 | |
| 211 | def copy(self): |
| 212 | """Return shallow copy of dictionary. |
| 213 | |
| 214 | >>> dd = DefDict.fromkeys(range(5), 5) |
| 215 | >>> ddcopy = dd.copy() |
| 216 | >>> print ddcopy._default, isinstance(ddcopy, DefDict); print ddcopy |
| 217 | 5 True |
| 218 | {0: 5, 1: 5, 2: 5, 3: 5, 4: 5} |
| 219 | >>> ddcopy[0] = 7 |
| 220 | >>> print dd[0], ddcopy[0] |
| 221 | 5 7 |
| 222 | """ |
| 223 | return self.__class__(self, self._default) |
| 224 | |
| 225 | __copy__ = copy |
| 226 |
no outgoing calls
no test coverage detected