Beispiel #1
0
 def _traverse_dict_for_objs(obj):
     for k, v in obj.items():
         if Box.is_box(v):
             obj[k] = Box.from_obj(v)
         elif isinstance(v, Mapping):
             _traverse_dict_for_objs(v)
         elif isinstance(v, list):
             _traverse_list_for_objs(v)
Beispiel #2
0
 def _traverse_list_for_objs(obj):
     for i, v in enumerate(obj):
         if Box.is_box(v):
             obj[i] = Box.from_obj(v)
         elif isinstance(value, Mapping):
             _traverse_dict_for_objs(v)