python persistence
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Tue Apr 1 12:34:30 EDT 2008
En Tue, 01 Apr 2008 08:47:33 -0300, <castironpi at gmail.com> escribió:
>> >>>> c['0']= type('None',(),{})
>> > Traceback (most recent call last):
>> > pickle.PicklingError: Can't pickle <class '__main__.None'>: it's not
>> > found as __main__.None
>>
>> Don't do that then. Or use the available pickle hooks to customize how
>> such classes may be pickled. All persistence mechanisms have
>> limitations.
>
> I don't see a problem with that; except that binaries come from
> disks. You could have a Python session that runs entirely on disks +
> the ALU.
(ALU? Do you mean CPU?) I don't understand this. Most programs are read
from disk. Most data is read from disk.
> I want to know if any, and correct me here, simple
> modification can store live objects. I call a.append(it) and the
> memory update takes place on disk instead.
Using ZODB, a.append(it) would mark `a` as dirty. When you latter commit
the transaction, it is stored back on disk.
> If you require that all objects referenced by on-disk objects be on-
> disk, that's an easy workaround.
ZODB already does that.
--
Gabriel Genellina
More information about the Python-list
mailing list