Browse Source

Expando `get` helper method

Added a dict like `get` method to Expando class
main
Kostas Papadimitriou 13 years ago
parent
commit
7815b31c5e
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      hyde/model.py

+ 6
- 0
hyde/model.py View File

@@ -81,6 +81,12 @@ class Expando(object):
result[k] = v
return result

def get(self, key, default=None):
"""
Dict like get helper method
"""
return self.__dict__.get(key, default)


class Context(object):
"""


Loading…
Cancel
Save