repo.or.cz
/
JPSSData.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fixing matplotlib
[JPSSData.git]
/
utils.py
blob
485d4bb95e4d74a353ff1e0094cf8cbb17a6bf61
1
# Copyright (C) 2013-2016 Martin Vejmelka, UC Denver
2
3
class
Dict
(
dict
):
4
"""
5
A dictionary that allows member access to its keys.
6
A convenience class.
7
"""
8
9
def
__init__
(
self
,
d
):
10
"""
11
Updates itself with d.
12
"""
13
self
.
update
(
d
)
14
15
def
__getattr__
(
self
,
item
):
16
try
:
17
return
self
[
item
]
18
except
KeyError
:
19
raise
AttributeError
(
item
)
20
21
def
__setattr__
(
self
,
item
,
value
):
22
self
[
item
] =
value