Python Persistence
suggest changeSyntax
pickle.dump(obj, file, protocol=None, *, fix_imports=True)pickle.load(file, *, fix_imports=True, encoding="ASCII", errors="strict")
Parameters
| Parameter | Details |
|---|---|
| obj | The object to pickle. dump writes its pickled representation to the open file object file. |
| protocol | An integer. It tells the pickler to use the given protocol. 0 is ASCII and 1 is an old binary format. Higher protocols exist; on Python 3.14 the default and the highest protocol are both 5. |
| file | The file argument must have a write() method for dump and a read() method for load. Open it with wb to dump and rb to load. |
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents