[Zope-dev] Re: 2.7 assertion with CVS of this morning
Yuppie
schubbe at web.de
Wed Jan 14 03:20:06 EST 2004
Hi Robert!
robert wrote:
> I found this,
> however 'has_order_support' is not the third argument.
> That is why I do not unterstand what happens.
[...]
>>_.hasattr(this().aq_self, 'has_order_support')
I don't know that code very well, but this is how I understand what happens:
All names in the TemplateDict are bound as methods. If you call hasattr
the TemplateDict ('self') is passed in as first argument, in our case
'has_order_support' becomes the third argument. To avoid this functions
need to be wrapped by NotBindable.
Did you see my other mail? Adding 'hasattr' (not 'guarded_hasattr') to
_NEED_WRAPPING works for me.
Cheers,
Yuppie
More information about the Zope-Dev
mailing list