[ZODB-Dev] How do you "wake up" sleepy persistent objects?
Chris McDonough
chrism@zope.com
Fri, 12 Oct 2001 08:05:53 -0400
from Acquisition import aq_base
base = aq_base(some_ob)
if hasattr(base, 'foo'): do something
Chris Withers wrote:
> Jim Fulton wrote:
>
>>The only time to mess with a __dict__ is when you actually want
>>to defeat the normal persistence machinery.
>>
>
> ...or acquisition :-S
>
> What's the recommended way of _really_ finding out whether an object has an
> attribute and making sure it hasn't been acquired?
>
> (I used to use obj.__dict__.has_key('foo') but now i'm not sure...)
>
> Chris
>
--
Chris McDonough Zope Corporation
http://www.zope.org http://www.zope.com
"Killing hundreds of birds with thousands of stones"