| 818 | return out_dict |
| 819 | |
| 820 | def update(self, *args, **kwargs): |
| 821 | if self._box_config["frozen_box"]: |
| 822 | raise BoxError("Box is frozen") |
| 823 | if (len(args) + int(bool(kwargs))) > 1: |
| 824 | raise BoxTypeError(f"update expected at most 1 argument, got {len(args) + int(bool(kwargs))}") |
| 825 | single_arg = next(iter(args), None) |
| 826 | if single_arg: |
| 827 | if hasattr(single_arg, "keys"): |
| 828 | for k in single_arg: |
| 829 | self.__convert_and_store(k, single_arg[k]) |
| 830 | else: |
| 831 | for k, v in single_arg: |
| 832 | self.__convert_and_store(k, v) |
| 833 | for k in kwargs: |
| 834 | self.__convert_and_store(k, kwargs[k]) |
| 835 | |
| 836 | def merge_update(self, *args, **kwargs): |
| 837 | merge_type = None |