Aaron "Castironpi" Brady a écrit :
(snip)
You should write it like this:

class B(object):
     @A.proxy
     def bmethod(self,a):

Making 'proxy' a class method on A.

That's exactly what I wanted to avoid here : making B depending on A.

(snip)

I agree that __setattr__ is the canonical solution to proxy,

Err... I assume you mean '__getattr__' ???

but you
have stated that you want each proxied method to be a member in the
proxy class.

This doesn't necessarily imply that "proxied" classes need to know about the "proxying" class. FWIW, that was the whole point : decoupling.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to