summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Bernardo Pimentel <rbp@isnomore.net>2012-04-29 17:27:29 +0200
committerRodrigo Bernardo Pimentel <rbp@isnomore.net>2012-04-29 17:27:29 +0200
commitf1d22a445260e0845cbf47a3a6519bbe37db9d4e (patch)
tree0fa1826f68ee082d9155409e387f2414909cd6d2
parent350910b8da94bfc4eca59fe3096cbd286c7a45c6 (diff)
downloadpystache-f1d22a445260e0845cbf47a3a6519bbe37db9d4e.tar.gz
Auto-calling elements in the middle of a dot-notation path (reverts 3c5a6db5a0fe7cfeaee04476419ca2b7ada18b1e)
-rw-r--r--pystache/context.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/pystache/context.py b/pystache/context.py
index 4121dc5..d5570da 100644
--- a/pystache/context.py
+++ b/pystache/context.py
@@ -49,10 +49,7 @@ def _get_value(item, key):
# are considered objects by the test above.
if hasattr(item, key):
attr = getattr(item, key)
- # If there are still parts to process (in a dot-notation key),
- # we do not automatically invoke the object, even if it's callable.
- autocall = len(rest) == 0
- if autocall and _is_callable(attr):
+ if _is_callable(attr):
value = attr()
else:
value = attr