class Parrot(object):
class _dummy(object):
def __init__(self, obj, name):
self.name = name
self.obj = obj
def __call__(self, *args, **kw):
print "dummy %s for %s" % (self.name, self.obj)
print "called with %s - %s" % (str(args), str(kw))
def __getattr__(self, name):
return self._dummy(self, name)
hth
--
http://mail.python.org/mailman/listinfo/python-list
