1. 程式人生 > >python 3.X 沒有cPickle

python 3.X 沒有cPickle

Protocol version 3 was added in Python 3.0. It has explicit support for bytes and cannot be unpickled by Python 2.x pickle modules

f = open('draft.txt','w') --------------> f = open('draft.txt','wb')

f = open('draft.txt','r') --------------> f = open('draft.txt','rb')