[Zope-dev] _getOb or __getattr__?

Chris McDonough chrism@digicool.com
Tue, 27 Feb 2001 12:22:49 -0500


> Sorry, just thought of another coupla questions:
>
> If x is an instance of my class, then:
> If I do x.a = 1, is _setOb called?
> If I do print x.a, is _getOb called?

No in either case.

_setOb shouldn't be used directly in the current ObjectManger
implementation.  It doesn't populate the _objects list of the object manager
on which it was called (your object won't show up).  Instead, _setObject
should be called.