Your discussion of the proxy pattern might be enriched by using Pyro as a functioning implementation of this pattern.
Basic usage:
class myclass(Pyro.core.ObjBase):
def __init__(self):
Pyro.core.ObjBase.__init__(self)
# Other initialization
def mymethod(self, *args, **kwargs):
# Do something with args
def add(self, x, y):
return x + y
# Now somewhere else, possibly on a different machine):
>>> import Pyro
>>> Pyro.core.initClient()
>>> # URI is a resource locator
>>> proxy = Pyro.core.getAttrProxyForURI(URI)
>>> proxy.add(1,2)
3
>>> proxy.mymethod(*lst, **dct)
>>>
All getattr, setattr calls are transparently proxied -- to the code using the client object, it appears exactly like the object is local (just with an uncommonly high latency).