asdlGen
Reference Manual
: Pickles
: User Visible InterfaceAs part of the output code every defined type has a read
and write
function that writes values of that type to or from a stream. There are also
read_tagged
and write_tagged
functions that first output a unique
tag before writing out the rest of the type. These functions are useful when
you expect to write several different kinds of pickles to the same stream
and want a minimal level of error checking.
The ASDL pickle format requires that both the reader and writer of the pickler agree on the type of the pickle. Other than constructor tags for sum types, there is no explicit type information in the pickle. In the case of an error the behavior is undefined. It is also important for the streams to be opened in binary mode to prevent line feed translations from corrupting the pickle.
Plans are being made to support a text based pickle format similar to XML/SGML
asdlGen
Reference Manual
: Pickles
: User Visible Interface