Support for pickle. The tricks played with caching references in :func:`SortedDict.__init__` confuse pickle so customize the reducer.
(self)
| 577 | |
| 578 | |
| 579 | def __reduce__(self): |
| 580 | """Support for pickle. |
| 581 | |
| 582 | The tricks played with caching references in |
| 583 | :func:`SortedDict.__init__` confuse pickle so customize the reducer. |
| 584 | |
| 585 | """ |
| 586 | items = dict.copy(self) |
| 587 | return (type(self), (self._key, items)) |
| 588 | |
| 589 | |
| 590 | @recursive_repr() |