PyDocs

Nav

Data Persistence

dump

marshal

function
  • dump(value, file, version=version, /, *, allow_code=True)
Write the value on the open file.

  value
    Must be a supported type.
  file
    Must be a writeable binary file.
  version
    Indicates the data format that dump should use.
  allow_code
    Allow to write code objects.

If the value has (or contains an object that has) an unsupported type, a
ValueError exception is raised - but garbage data will also be written
to the file. The object will not be properly read back by load().
Changed in 3.13
  • 3.13: Added the allow_code parameter.
0 Examples
No examples for marshal/dump.
See Also
No see-alsos for marshal/dump
0 Notes
No notes for dump