def __getattr__(self, name): ''' ''' if not hasattr(self, '__implements__') or self.__implements__ == None or \ interface.isreadable(self, name): return getattr(self.__source__, name) raise interface.InterfaceError, 'can\'t read attribute "%s".' % name
def __getattribute__(self, name): ''' ''' if name in ('__implements__',) or \ not hasattr(self, '__implements__') or self.__implements__ == None or \ interface.isreadable(self, name): return super(ObjectWithInterface, self).__getattribute__(name) raise interface.InterfaceError, 'can\'t read attribute "%s".' % name