diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-05-02 21:03:32 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-05-02 21:03:32 -0700 |
commit | 679ba6a95ca41f4aa296ba734f650b872dde477e (patch) | |
tree | 7b548137247bd3e0da9dedf0985e7a44210eb6b2 /pystache | |
parent | 1ef4f9062f9b82a58de66dbde0df7d7fd444e60a (diff) | |
download | pystache-679ba6a95ca41f4aa296ba734f650b872dde477e.tar.gz |
Renamed value to result in ContextStack.get().
Diffstat (limited to 'pystache')
-rw-r--r-- | pystache/context.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pystache/context.py b/pystache/context.py index cbc8158..175a7ad 100644 --- a/pystache/context.py +++ b/pystache/context.py @@ -191,12 +191,12 @@ class ContextStack(object): parts = name.split('.') - value = self._get_simple(parts[0]) + result = self._get_simple(parts[0]) for part in parts[1:]: # TODO: consider using EAFP here instead. # http://docs.python.org/glossary.html#term-eafp - if value is _NOT_FOUND: + if result is _NOT_FOUND: break # The full context stack is not used to resolve the remaining parts. # From the spec-- @@ -208,12 +208,12 @@ class ContextStack(object): # the empty string. # # TODO: make sure we have a test case for the above point. - value = _get_value(value, part) + result = _get_value(result, part) - if value is _NOT_FOUND: + if result is _NOT_FOUND: return default - return value + return result # TODO: combine the docstring for this method with the docstring for # the get() method. |