Skip to content

Instantly share code, notes, and snippets.

@colllin
Created August 2, 2023 16:15
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 colllin/fbe63d343def17eb2354f952cc3b1dfb to your computer and use it in GitHub Desktop.
Save colllin/fbe63d343def17eb2354f952cc3b1dfb to your computer and use it in GitHub Desktop.
dotdict.py — Simple dot-notation access for python dicts.
# Copied from: https://stackoverflow.com/a/23689767
class dotdict(dict):
"""dot.notation access to dictionary attributes"""
__getattr__ = dict.get
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment