Dennis Allison wrote:
I am having trouble understanding what they are and how one gets from
a "state" to the ZODB value associated with thast state. Can someone
The state is whatever __getstate__ and __getstate__ manipulate. It has
to be picklable. For persistent classes, an instance dict is the common
case. persistent.Persistent.__getstate__ has this docstring:
Get the object serialization state
If the object has no assigned slots and has no instance dictionary, then
None is returned.
If the object has no assigned slots and has an instance dictionary, then
the a copy of the instance dictionary is returned. The copy has any items
with names starting with '_v_' or '_p_' ommitted.
If the object has assigned slots, then a two-element tuple is returned.
The first element is either None or a copy of the instance dictionary,
as described above. The second element is a dictionary with items
for each of the assigned slots.
Other classes can specialise the methods, see for instance BTrees.Length.
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -