[Zope-CMF] isinstance on ActionProviderBase
Dieter Maurer
dieter at handshake.de
Wed Oct 1 15:24:48 EDT 2003
Nicolas Romero wrote at 2003-9-30 12:09 +0200:
> I am developping a product and I have a problem using isinstance on
> ActionProviderBase objects. Here is an excerpt of my code :
> ...
> if isinstance( obj, ActionProviderBase):
> Let obj be a CMF tool...
Be aware, that Zope objects usually do *not* have the type you
expect. Instead, they are usually acquisition wrappers.
Always use "aq_base(obj)" in "isinstance" checks...
Dieter
More information about the Zope-CMF
mailing list