numarray + cPickle problem

Andrea Griffini agriff at tin.it
Sat Nov 13 13:43:20 EST 2004


On 13 Nov 2004 09:30:31 -0800, "Bill  Mill" <bill.mill at gmail.com>
wrote:

>Perhaps this should be mentioned in the cPickle documentation?

It *IS* documented...

  Pickler(...)
      Pickler(file, proto=0) -- Create a pickler.
 
      This takes a file-like object for writing a pickle
      data stream.
      The optional proto argument tells the pickler to
      use the given protocol; supported protocols are 0,
      1, 2. The default protocol is 0, to be backwards
      compatible.  (Protocol 0 is the only protocol that
      can be written to a file opened in text mode and
-->   read back successfully.  When using a protocol
-->   higher than 0, make sure the file is opened in
-->   binary mode, both when pickling and unpickling.)

      ...

Andrea



More information about the Python-list mailing list