crystalattice wrote:
>
> Plus, to modify data in a class

I presume the word "instance" is missing here ...

> do I have to unpickle the whole thing
> first or is there a way to modify the data while it's pickled?  Actually,
> I think I can answer that last question:  a character instance, having
> been created, will stay resident in memory until the player quits,
> character dies, or otherwise is no longer needed.  At that point the
> character instance should be pickled (if necessary) to disk; pickle
> shouldn't be used while data modification is required and the class
> instance is "active", correct?

A pickle is a snapshot of an object and its contents. If the real
scenery changes, you need to take another photo.

Unpickling creates another instance from the blueprint. You can repeat
this to obtain multiple distinct copies of the instance.

Partial unpickling is not possible.

Use cPickle if you can; it's much faster.

HTH,
John

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to