class myint(int):
pass
class Desc(object):
def __init__(self):
self.num = myint(0)
def __get__(self, instance, instance_type=None):
return getattr(instance, '_x', myint(0))
def __set__(self, instance, value):
setattr(instance, '_x', myint(value))
class WithDesc(object):
x = Desc()