Name

dump, dumps

Synopsis

dump(value,fileobj)
dumps(value)

dumps returns a string representing object value. dump writes the same string to file object fileobj, which must be opened for writing in binary mode. dump( v,f ) is just like f .write(dumps( v )). fileobj cannot be a file-like object: it must be an instance of type file.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.