Tim Peters wrote:

Yes:  regardless of platform, always open files used for pickles in
binary mode.  That is, pass "rb" to open() when reading a pickle file,
and "wb" to open() when writing a pickle file.  Then your pickle files
will work unchanged on all platforms.  The same is true of files
containing binary data of any kind (and despite that pickle protocol 0
was called "text mode" for years, it's still binary data).

I've been wondering why there even is the choice between binary mode and text mode. Why can't we just do away with the 'text mode' ? What does it do, anyways? At least, if it does something, I'm sure that it isn't something that can be done in Python itself if really required to do so...

--Irmen

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

Reply via email to