fixing matplotlib
[JPSSData.git] / utils.py
blob485d4bb95e4d74a353ff1e0094cf8cbb17a6bf61
1 # Copyright (C) 2013-2016 Martin Vejmelka, UC Denver
3 class Dict(dict):
4 """
5 A dictionary that allows member access to its keys.
6 A convenience class.
7 """
9 def __init__(self, d):
10 """
11 Updates itself with d.
12 """
13 self.update(d)
15 def __getattr__(self, item):
16 try:
17 return self[item]
18 except KeyError:
19 raise AttributeError(item)
21 def __setattr__(self, item, value):
22 self[item] = value