[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] ideas for saving points in games



Ian Mallett wrote:
On 9/23/07, Aaron Maupin <maupin@xxxxxxxxxxxxxx> wrote:

Eric Hunter wrote:
You could just pickle the list.  That's essentially what I used for

pickle?
I've always used .txt files.

Pickling can be very convenient, but it ties your file
format very closely to internal details of your program.
Restructuring your program in any way is likely to
render your existing pickled files useless.

Designing an external format that's less dependent on
the program internals allows you to future-proof things
a lot more.

Also, using text has the advantage that you can fix
things up with a text editor if need be.

--
Greg