(self, memodict=None)
| 597 | return self.copy() |
| 598 | |
| 599 | def __deepcopy__(self, memodict=None): |
| 600 | config = self.__box_config() |
| 601 | out = self.__class__(**config) |
| 602 | memodict = memodict if memodict is not None else {} |
| 603 | memodict[id(self)] = out |
| 604 | # Fill it like __init__ does, still "being created", so nested Boxes get the frozen config too |
| 605 | frozen = self._box_config["frozen_box"] |
| 606 | if frozen: |
| 607 | out._box_config["__created"] = False |
| 608 | for k, v in self.items(): |
| 609 | out[copy.deepcopy(k, memodict)] = copy.deepcopy(v, memodict) |
| 610 | out._box_config["__created"] = True |
| 611 | self.__copy_internals(out, deep=True, memo=memodict) |
| 612 | return out |
| 613 | |
| 614 | def __setstate__(self, state): |
| 615 | self._box_config = state["_box_config"] |
nothing calls this directly
no test coverage detected