[PEAK] very elementary peak.model question
quale1 at charter.net
Thu Jul 15 12:10:44 EDT 2004
"Phillip J. Eby" <pje at telecommunity.com> writes:
> Don't use setattr in the lazy loader. You *must* set directly into
> the object's dictionary, or call the slot's __set__ method if the
> attribute is stored in a slot rather than __dict__.
> Also, don't use 'b.x =' to set the lazy loader into the object either.
> Again, this should be via the dictionary.
> Remember that lazy loaders and object state are part of the
> implementation of model elements, not a part of their interface.
> Normally, the place where LazyLoaders are used is in a DM's '_load()'
> method, returned as part of a state dictionary that gets stuffed into
> the object.
Doh!. Thanks. One of my favorite quotes is that no question is too
dumb to ask, but some are too dumb to answer. I think my question
is/was one of those, but I appreciate the help.
More information about the PEAK