def add_dimension(self, name, data=None):
        """Add a named dimension to this entity."""
        self.dimensions.add(name)
        if data is None:
            valobj = self.__dimtype__()
        else:
            valobj = make_object(self.__dimtype__, data)
        self._data[name] = valobj
        setattr(self, name, valobj)
        return valobj
def add_dimension ( self , name , data = None ) : self . dimensions . add ( name ) if data is None : valobj = self . __dimtype__ ( ) else : valobj = make_object ( self . __dimtype__ , data ) self . _data [ name ] = valobj setattr ( self , name , valobj ) return valobj
Add a named dimension to this entity.