diff --git a/geomagio/Util.py b/geomagio/Util.py index 408b2af8a2908b189b8a713367846305fd70e3e7..85eee183694a3d69e907f9a5c5835058bd7d96ef 100644 --- a/geomagio/Util.py +++ b/geomagio/Util.py @@ -1,6 +1,19 @@ + + 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): self.__dict__ = d def __str__(self): + """ + Override string representation to output wrapped dictionary. + """ return str(self.__dict__)