Make sure namespace gets updated when setting attributes.

def _set_attribute(self, name, value):
        """Make sure namespace gets updated when setting attributes."""
        setattr(self, name, value)
        self.namespace.update({name: getattr(self, name)})