Closed ipcoder closed 4 years ago
Well that's something I guess I never thought about was propagating the settings to already created sub-boxes.
It would make sense that all box objects coming into another box should adhere to the parents convention. However I can also see where some might find that detrimental, so it will have to be configurable (probably with auto inheritance being the standard.)
This is something I will want to flush out for 5.0
I am starting to cut pre-releases for 5.0.0, if you are feeling adventurous please test it out and let me know if it solves your issues!
pip install --upgrade "python-box[all]>=5.0.0a0"
Details on the new wiki
Is that a designed behaviour:
When combining a structure from pieces a mixed dict/Box hierarchy may emerge, and to make it frozen one should now traverse it and change box-node by node, or some ugly thing like that:
An alternative would be to make sure that
Box(struct, frozen_box=True)
would make sure all the sub-boxes are frozen too.What do you think? Thanks