def description(self, d):
    if not d:
        raise Exception('description cannot be empty')
self._description = d

@property
def value(self):
    return self._value

@value.setter
def value(self, v):
    if not v > 0:
        raise Exception('value must be greater than zero')
self._value = v
Correct approach to validate attributes of an instance of class