[Zope-dev] Re: hasattr implementation for Zope?

Dieter Maurer dieter at handshake.de
Sat May 28 04:20:48 EDT 2005


Paul Winkler wrote at 2005-5-27 11:02 -0400:
> ...
>def safe_hasattr(obj, attr, acquired=True, _marker=[]):
>    if not acquired:
>        obj = aq_inner(aq_explicit(obj))

This should be "obj = aq_base(obj)".

The "aq_explicit(aq_inner(...))" dance is only necessary in
untrusted code as "aq_base" is not available there.

-- 
Dieter


More information about the Zope-Dev mailing list