Comments in pickles?

Tim Peters tim.one at comcast.net
Tue Jul 2 22:47:15 EDT 2002


[Roy Smith]
> I've got a file parser that returns a data structure.  As part of a
> regression test suite, I'm going to parse several sample files and save
> the resulting data structures as pickle files to compare against future
> versions.  I want to check those pickles into CVS.
>
> Our usual practice is to imbed the CVS id string ($Id: ) in every
> checked-in file as a comment.

I encourage you to question that practice.

> Is there any way to do that with a pickle?  Does a comment convention
> exist which cPickle.load() understands?

No.  If you have to do this, give your data structures a (say) .rcsid
attribute, and store the $Id in that as a string.






More information about the Python-list mailing list