PyDocs

Nav

Data Persistence

dumps

marshal

function
  • dumps(value, version=version, /, *, allow_code=True)
Return the bytes object that would be written to a file by dump(value, file).

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

Raise a ValueError exception if value has (or contains an object that
has) an unsupported type.
Changed in 3.13
  • 3.13: Added the allow_code parameter.
0 Examples
No examples for marshal/dumps.
See Also
No see-alsos for marshal/dumps
0 Notes
No notes for dumps