From: noah morrison Date: Thu, 9 Apr 2015 03:28:03 +0000 (-0400) Subject: Make a comment more descriptive X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=ad5bf8602fe673c9702c8cf1f7d21a0b24dbe09c;p=chevron.git Make a comment more descriptive --- 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: