Ian Bicking: the old part of his blog

Comment

argh... sorry about that code, I should have known :)

....def remember(self, adapter, interface=None):
........"""Remember an object that implements some interfaces.
........Later, calls to .locate which are passed an interface implemented
........by this object will return this object.
........
........If the 'interface' argument is supplied, this object will only
........be remembered for this interface, and not any of
........the other interfaces it implements.
........"""
........if interface is None:
............interfaceList = megaGetInterfaces(adapter)
............if not interfaceList:
................interfaceList = [dataqual]
........else:
............interfaceList = [qual(interface)]
........if self._remembrances is None:
............self._remembrances = {}
........for interface in interfaceList:
............self._remembrances[interface] = adapter
........return self
Comment on Dealing with Context
by Valentino Volonghi