From ad5bf8602fe673c9702c8cf1f7d21a0b24dbe09c Mon Sep 17 00:00:00 2001 From: noah morrison Date: Wed, 8 Apr 2015 23:28:03 -0400 Subject: [PATCH] Make a comment more descriptive --- chevron/renderer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chevron/renderer.py b/chevron/renderer.py index 7ef8e28..d46413e 100644 --- a/chevron/renderer.py +++ b/chevron/renderer.py @@ -57,15 +57,15 @@ def _get_key(key, scopes): # For every dot seperated key for child in key.split('.'): # Move into the scope - # Return the last scope we got - # or an empty string if falsy - try: # Try subscripting (Normal dictionaries) scope = scope[child] except (TypeError, AttributeError): # Try the dictionary (Complex types) scope = scope.__dict__[child] + + # Return an empty string if falsy, with two exceptions + # 0 should return 0, and False should return False if scope is 0: return 0 if scope is False: -- 2.47.3