From 15a1ed409e7d0ca13253b63d08214ddf1e30c383 Mon Sep 17 00:00:00 2001 From: Patrick Esser Date: Wed, 7 Aug 2019 13:49:40 +0200 Subject: [PATCH] fix final expansion of retrieve --- edflow/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/edflow/util.py b/edflow/util.py index babe9c8..6d03bd2 100644 --- a/edflow/util.py +++ b/edflow/util.py @@ -202,6 +202,10 @@ def retrieve( raise KeyNotFoundError(e) visited += [key] + # final expansion of retrieved value + if expand and callable(list_or_dict): + list_or_dict = list_or_dict() + parent[last_key] = list_or_dict except KeyNotFoundError as e: if default is None: print("Key not found: {}, seen: {}".format(keys, visited))