class Descriptor(object):

    def __init__(self, name):
        self.name = name

def __get__(self, instance, cls):
    print('Getting %s, with instance %r, class %r' % (self.name, instance, cls))


class Foo(object):
    _spam = 'eggs'

@property
def spam(self):
    return self._spam

@spam.setter
def spam(self, val):
    self._spam = val
Foo().spam
foo = Foo()
foo.__dict__['spam'] = Descriptor('Override')
foo.spam
данные Python и дескрипторы без данных