Created
June 6, 2019 07:24
-
-
Save SuperShinyEyes/3235ebacdde4a0b6434665cdde5d1008 to your computer and use it in GitHub Desktop.
Python utilities
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 EasyDict(dict): | |
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) | |
def __getattr__(self, name): return self[name] | |
def __setattr__(self, name, value): self[name] = value | |
def __delattr__(self, name): del self[name] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment