'Retrieve the value for a key from the context.
@param key: The key to look up in the context.
@param default: The value to return if C{key} is not found in the
context.
@return: The value most recently remembered in the context for C{key}.'

def getContext(self, key, default=None):

    for ctx in reversed(self.contexts):
        try:
            return ctx[key]
        except KeyError:
            pass
    return default
