I want to be able to transform a dictionary in a list of options that can be set (with the full path), for example this should pass:
def test_dic_to_args(self):
dic = {"x1": {"x2": "val1"}, "x2": "val3"}
des = ["x1.x2:val1", "x2:val3"]
self.assertEqual(conf.dict_to_args(dic), des)
Now I started to write it and I thought it was easy, but it's more tricky than I thought, with queues, type checking and so on.. Is there a smart way to solve this problem? Maybe the best option is still a recursive DFS, what do you think?