Last active
August 26, 2017 22:15
-
-
Save gyorb/73092020f1a53432ff611272ddd622c1 to your computer and use it in GitHub Desktop.
brunch pattern
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
| # named by Alex Martelli in the Python Cookbook | |
| class Bunch(dict): | |
| def __init__(self, *args, **kwds): | |
| super(Bunch, self).__init__(*args, **kwds) | |
| self.__dict__ = self | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment