[ZPatterns] Problem in latest ZPatterns: setattr, id, etc.
Steve Alexander
[email protected]
Mon, 13 Aug 2001 18:50:49 +0100
Phillip J. Eby wrote:
>
> I've checked something similar into CVS. The main difference is that
> the version I've checked in maintains the same behavior as the old for
> situations where the _v_dm_ is not set. Basically, my version of the
> patch skips the canonical form lookup, objectChanging call, and
> attribute provider delegation if _v_parent is not set, falling through
> to the default persistent attribute setting code.
That looks like a good thing.
Pedantic code review: Just after the bit of __set_attr__ you've changed,
you can replace the self.__dict__ with a d:
if not self._rackMounted or name in ('id','__name__'):
self.__dict__[name]=val
if not self._rackMounted or name in ('id','__name__'):
d[name]=val
--
Steve Alexander