[Zope-dev] _getOb or __getattr__?

Chris Withers chrisw@nipltd.com
Tue, 27 Feb 2001 16:33:29 +0000


Jeffrey P Shell wrote:
> 
> _getOb and _setOb are for placing subobjects somewhere besides attributes
> (which is the default implementation).
> 
> _getOb and friends are the default protocol that *SHOULD* be used by systems
> that change subobjects (ie - copy and paste).

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?

cheers,

Chris