view ___getattribute__ @ 244:eee52d5a4af8 default tip

created
author 127.0.0.1
date Sun, 30 Jun 2013 11:08:33 +0200
parents 3003a13eb3d0
children
line wrap: on
line source

{{{#!python
class object:
    def __getattribute__(self, name):
        if name in self.__dict__:
            return self.__dict__[name]
        for cls in self.__class__.mro():
            if name in cls.__dict__:
                return cls.__dict__[name]
        return self.__getattr__(name)
}}}