Created
December 1, 2018 16:57
-
-
Save redraw/f5ac371a407a84b8667edff1c28bd9bf to your computer and use it in GitHub Desktop.
This file contains hidden or 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): | |
| def __getattr__(self, value): | |
| if not value in dir(self) and value in self: | |
| return self[value] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment