Created
August 17, 2010 14:10
-
-
Save mdornseif/530082 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Irgendwo hatten wir dieses snippet in eleganter = aber wo? | |
class DictObj(object): | |
def __init__(self, d): | |
self.d = d | |
def __getattr__(self, m): | |
return self.d.get(m, None) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment