def get(self, obj, key):
if key not in self._exposed:<EOL><INDENT>raise MethodNotExposed()<EOL><DEDENT>rightFuncs = self._exposed[key]<EOL>T = obj.__class__<EOL>seen = {}<EOL>for subT in inspect.getmro(T):<EOL><INDENT>for name, value in subT.__dict__.items():<EOL><INDENT>for rightFunc in rightFuncs:<EOL><INDENT>if value is rightFunc:<EOL><INDENT>if name in seen:<EOL><INDENT>raise MethodNotExposed()<EOL><DEDENT>return value.__get__(obj, T)<EOL><DEDENT><DEDENT>seen[name] = True<EOL><DEDENT><DEDENT>raise MethodNotExposed()<EOL>
Retrieve 'key' from an instance of a class which previously exposed it.

@param key: a hashable object, previously passed to L{Exposer.expose}.

@return: the object which was exposed with the given name on obj's key.

@raise MethodNotExposed: when the key in question was not exposed with
this exposer.