def __getitem__(self, key, default=sentinel):
        if not isinstance(key, list):
            key = key.split('.') if isinstance(key, basestring) else [key]
        key, path = key.pop(0), key
        if len(path) > 0:
            return self.get(key).__getitem__(path, default)
        elif key not in self:
            if default is sentinel:
                #Return a parentless object (this might be evil)
                #CACHE it
                return self.__CACHE__.setdefault(
                    key, self.__class__(__PARENT__=(self, key)))
            else:
                return default
        else:
            return dict.get(self, key)
dataset/ETHPy150Open facebook/pyaib/pyaib/util/data.py/Object.__getitem__/original