Skip to content
Snippets Groups Projects
Commit e2e2a2d6 authored by Jeremy M Fee's avatar Jeremy M Fee
Browse files

Add comment for ObjectView class

parent d596dce4
No related branches found
No related tags found
No related merge requests found
class ObjectView(object): class ObjectView(object):
"""
Wrap a dictionary so its properties can be accessed as an object.
Parameters
----------
d : dictionary
The dictionary to wrap.
"""
def __init__(self, d): def __init__(self, d):
self.__dict__ = d self.__dict__ = d
def __str__(self): def __str__(self):
"""
Override string representation to output wrapped dictionary.
"""
return str(self.__dict__) return str(self.__dict__)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment