>> The advantage of pickle is that you don't have to
>> decide on a text format for your data -- it just dumps
>> and then reloads the python code. You can waste a lot
>> of time deciding on a text format, implementing the
>> readers/writers, etc.

> Well, it may be an advantage or it may one of the worst options... I
> try to avoid binary formats whenever possible. They're harder to
> debug, and usually don't offer much benefits when comparing to textual
> formats, etc. Read for example The Art of Unix Programming from
> Eric. S. Raymond if you want to know more.

> So, it may take much time to implement your read/write-functions but
> it's almost always at least as good as binary approach.

Pickle does not dump actual python code, but some simple stack language. I 
think it might be even in RPN. Pickle offers you a choice between binary and 
text format. It defaults to text format.

Matthias

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/P/>SS/>CC d--(+) s-: a--- C++ UL++ P-? L++ E- W++ N o? K? !w-- !O? !M? !V?
PS+++ PE++ Y+ PGP>+ t+ 5?>+ X(+) R+ !tv- b++(+++) DI?>+ D+++ G+ e->+++ h+ r y
------END GEEK CODE BLOCK------

"I have made this letter longer than usual because I lack the time to
make it shorter."
                -- Blaise Pascal
_______________________________________________
Tutor maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to