class ValidRange(object):

    def __init__(self, name, min_, max_):
        self._min = min_
self._max = max_
self._name = name

def __get__(self, instance, owner):
    return getattr(instance, self.name)

def __set__(self, instance, value):
    pass
Реализация декоратора для установки ограничений