[Zope3-dev] zope3-dev proposal on changing implicitly calling
Chris Withers
chrisw@nipltd.com
Wed, 06 Aug 2003 12:12:55 +0100
Steve Alexander wrote:
>> if isintance(r,MethodType):
>> return r()
>
> Getting the __class__ attribute works as expected in the presence of
> proxies. isinstance will work properly in the presence of proxies only
> in Python 2.3. This code can be simplified when Python 2.3 is required
> for Zope 3.
I could have sworn Jim said it was already...
>> Well, do all object implement traversable adapters? I would haev
>> thought most would just use the default traverser? In that case,
>> wouldn't you need to implemetn a traverser if you wanted traversal
>> from that object to the next name in the path to not have the result
>> of traversing that name being called?
>
> The default traverser only calls MethodType things. It doesn't call
> anything else.
Indeed, so if you had something else, or say a method htat took some parameters,
you'd have to write a traversal adapter for it, right?
cheers,
Chris