This website works better with JavaScript.
Home
Explore
Help
Sign In
jmg
/
hyde
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Expando `get` helper method
Added a dict like `get` method to Expando class
main
Kostas Papadimitriou
13 years ago
parent
d009400434
commit
7815b31c5e
1 changed files
with
6 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+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):
"""
Write
Preview
Loading…
Cancel
Save