-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
What happens
when I add two frozen boxes
c = a + b
exception is being thrown
File "box/box.py", line 311, in box.box.Box.__add__
File "box/box.py", line 862, in box.box.Box.merge_update
File "box/box.py", line 842, in box.box.Box.merge_update.convert_and_set
File "box/box.py", line 862, in box.box.Box.merge_update
File "box/box.py", line 854, in box.box.Box.merge_update.convert_and_set
File "box/box.py", line 654, in box.box.Box.__setitem__
box.exceptions.BoxError: Box is frozen
What should happen
New frozen box should be created by deeply merging (merge_update
) a
and b
How to reproduce
from box import Box
a = Box(foo={'bar': 1}, frozen_box=True)
b = Box(foo={'baz': 2}, frozen_box=True)
print(a + b)
Metadata
Metadata
Assignees
Labels
No labels