Use the 'Multicast' class to multiplex messages/attribute requests to objects which share the same interface.
Python, 43 lines
A 'Multicast' object will expose the same interface as the delegation targets (Multicasting won't work for the dictionary interface, since that is used by the 'Multicast' class itself.)
Attributes of individual delegates can be accessed by the alias name used to register them for delegation:
multicast["test"] = aClass() print multicast.aClassAttribute["test"]
Message chains are possible:
This will call 'aMethod' on 'aClassAttribute' from all delegation targets.