[ZODB-Dev] Python properties on Persistent objects

Mikko Ohtamaa mikko at redinnovation.com
Thu Dec 17 11:10:21 EST 2009


>
> Properties work with persistent objects with one limitation that I'm aware of.
> The __setattribute__ method used by the persistent base class assumes
> that any attribute assignment modifies the object's persistent state.
> A property
> that doesn't modify state or that modifies volatile state will fool
> it. Conceivably,
> one could override __setattribute__ to handle such properties, but doing so
> would require great care. I don't recommend it.

Great, thanks! I already assumed so, but now this little feature is
officially confirmed.

-Mikko


More information about the ZODB-Dev mailing list