def _set_cache_(self, attr):
        if attr in IndexObject.__slots__:
            # they cannot be retrieved lateron ( not without searching for them )
            raise AttributeError(
                "Attribute '%s' unset: path and mode attributes must have been set during %s object creation"
                % (attr, type(self).__name__))
        else:
            super(IndexObject, self)._set_cache_(attr)
        # END hanlde slot attribute
dataset/ETHPy150Open gitpython-developers/GitPython/git/objects/base.py/IndexObject._set_cache_/original