Skip to content

Dot dict #2

Description

@BebeSparkelSparkel

I thought that this was very helpful and made it much easier to access elements in a dictionary.
stack overflow thread

class dotdict(dict):
  '''
  dictionary that works with dot notation
  http://stackoverflow.com/questions/2352181/how-to-use-a-dot-to-access-members-of-dictionary
  '''
  __getattr__ = dict.get
  __setattr__ = dict.__setitem__
  __delattr__ = dict.__delitem__

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions