class Dept(object): def __init__(self, x): self.x = x
def __get__(self, instance, owner): print('__get__: instance:{} owner:{}'.format(instance, owner)) super(Dept, self).__get__(instance, owner)
def __getattr__(self, item): print('__getattr__: {}'.format(item)) super(Dept, self).__getattr__(item)
def __getitem__(self, item): print('__getitem__: {}'.format(item)) super(Dept, self).__getitem__(item)
def __getattribute__(self, item): print('__getattribute__: {}'.format(item)) super(Dept, self).__getattribute__(item)
|