Auto-calling elements in the middle of a dot-notation path (reverts…

Auto-calling elements in the middle of a dot-notation path (reverts 3c5a6db5)
parent 350910b8
...@@ -49,10 +49,7 @@ def _get_value(item, key): ...@@ -49,10 +49,7 @@ def _get_value(item, key):
# are considered objects by the test above. # are considered objects by the test above.
if hasattr(item, key): if hasattr(item, key):
attr = getattr(item, key) attr = getattr(item, key)
# If there are still parts to process (in a dot-notation key), if _is_callable(attr):
# we do not automatically invoke the object, even if it's callable.
autocall = len(rest) == 0
if autocall and _is_callable(attr):
value = attr() value = attr()
else: else:
value = attr value = attr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment