This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AttrDict(dict): | |
""" Simple class to make dictionary able to use attribute get operation | |
to get elements it contains using syntax like: | |
>>> d = AttrDict(arg1=1, arg2='hello') | |
>>> print d.arg1 | |
1 | |
>>> print d.arg2 | |
hello | |
>>> print d['arg2'] |