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
I spent some time to look into this more, and there are just some nuances that need addressed to get it working.
default_box will replace missing objects with new Box objects, specifically newly created classes of the current Box class (in this case TestBox) if not specified otherwise with default_box_attr.
Just changing that will still result in dict objects being added later being a recursion of itself. Because the missing objects will be replaced with a new instance of TestBox, which in the new __new__ returns itself.
(Not tested in depth but working for simple examples)
It appears that trying to use Default Box in a singleton pattern breaks it. See below for code and traceback
Traceback is as follows
Environment Details
The text was updated successfully, but these errors were encountered: