We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def recursive_dict_call(d: Dict, keys: List, default=None): def index_get(key): if '[' in key: key = key.split('[')[0] id_ = int(key.split('[')[1].split(']')[0]) return d.get(key, default)[id_] return d.get(key, default) if not isinstance(d, dict): return d elif len(keys) == 1: return index_get(keys[0]) else: return recursive_dict_call(index_get(keys[0]), keys[1:])
The text was updated successfully, but these errors were encountered:
def recursive_dict_call(d: Dict, keys: List, default=None): print(keys[0], '[' in keys[0], keys) def index_get(key): if '[' in key: key = key.split('[')[0] id_ = int(key.split('[')[1].split(']')[0]) return d.get(key, default)[id_] return d.get(key, default) if not isinstance(d, dict): return d elif len(keys) == 1: return index_get(keys[0]) else: return recursive_dict_call(index_get(keys[0]), keys[1:])
Sorry, something went wrong.
When branches are created from issues, their pull requests are automatically linked.
The text was updated successfully, but these errors were encountered: