Skip to content

Instantly share code, notes, and snippets.

@torufurukawa
Created November 18, 2011 04:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torufurukawa/1375605 to your computer and use it in GitHub Desktop.
Save torufurukawa/1375605 to your computer and use it in GitHub Desktop.
class DotDict(dict):
def __getattr__(self, attr):
return self.get(attr, None)
__setattr__= dict.__setitem__
__delattr__= dict.__delitem__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment