]> Devi Nivas Git - chevron.git/commitdiff
Make a comment more descriptive
authornoah morrison <noah@morrison.ph>
Thu, 9 Apr 2015 03:28:03 +0000 (23:28 -0400)
committernoah morrison <noah@morrison.ph>
Thu, 9 Apr 2015 03:28:03 +0000 (23:28 -0400)
chevron/renderer.py

index 7ef8e2843774fc81208b966939b9cd41b1bfaca3..d46413e66d17d08780b542f4c83646cc015bdb62 100644 (file)
@@ -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: