I want Funcy to provide pure nested path helpers for dictionaries and lists.
I want Funcy to provide pure nested path helpers for dictionaries and lists.: a task in MiMo-V2.6-RL-oss: Agentic RL Environments (MiMo RL release). I need get in(coll, path, default=None) to walk coll key for each key in path and return the nested value. For get in({'a': {'b': 42}}, 'a', 'b' ) it…
The task
I need get_in(coll, path, default=None) to walk coll[key] for each key in path and return the nested value. For get_in({'a': {'b': 42}}, ['a', 'b']) it should return 42, and for get_in({'x': [1, 2]}, ['x', 1]) it should return 2. Missing keys or list indexes should return the…
Part of XiaomiMiMo/MiMo-V2.6-RL-oss.