[Zope] acquisition and __bobo_traverse__

Dylan Reinhardt zope at dylanreinhardt.com
Mon Jan 19 20:56:29 EST 2004


Hi All,

I have a situation where I want one object to alias methods that are
actually provided by a different object.  This is being done in
__bobo_traverse__ in a Python product that subclasses Folder

I can call another object's method easily enough, but when I do this, it
will resolve all names in the context of the *calling* object, not the
method's physical container. That makes a certain amount of sense,
perhaps... but it isn't what I *want* to happen.  

I've tried various combinations like:

obj.method
obj.method.__of__(self)
obj.method.__of__(obj)

All with no joy... in each case, the method is the correct method but
names are resolved by the *calling* object, not by the returned method's
container.  

Any ideas how to make this work the way I want it to?

TIA,

Dylan




More information about the Zope mailing list