Last active
December 19, 2015 05:49
-
-
Save linnchord/5906746 to your computer and use it in GitHub Desktop.
A tiny clean python DictProxyObject from https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/base.py.
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 DictProxyObject(dict): | |
"""Container object for datasets: dictionary-like object that | |
exposes its keys as attributes.""" | |
def __init__(self, **kwargs): | |
dict.__init__(self, kwargs) | |
self.__dict__ = self |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment