You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current behavior of default_box_create_on_get is not what you would expect and eliminates a large part what makes default_box useful in the first place.
In the following case I would still expect b.foo.bar to be set to 1.
>>> b = Box(default_box=True, default_box_create_on_get=False)
>>> b.foo.bar
Box({})
>>> b.foo.bar = 1
>>> b.foo.bar
Box({})
>>> b
Box({})
Not sure if this is feasible, but a new config option default_box_create_on_set could be added to control this behavior.
The text was updated successfully, but these errors were encountered:
wrdls
changed the title
default_box_create_on_get=False should still create nested keys on assigment
default_box_create_on_get=False should still create keys on assigment
Jul 4, 2024
As reported before in #164 (comment)
The current behavior of
default_box_create_on_get
is not what you would expect and eliminates a large part what makesdefault_box
useful in the first place.In the following case I would still expect
b.foo.bar
to be set to1
.Not sure if this is feasible, but a new config option
default_box_create_on_set
could be added to control this behavior.The text was updated successfully, but these errors were encountered: