Skip to content

The top-level preserves package

import preserves

The main package re-exports a subset of the exports of its constituent modules:

It also exports the compare and fold modules themselves, permitting patterns like

>>> from preserves import *
>>> compare.cmp(123, 234)
-1

Finally, it provides a few utility aliases for common tasks:

dumps = stringify module-attribute

This alias for stringify provides a familiar pythonesque name for converting a Preserves Value to a string.

loads = parse module-attribute

This alias for parse provides a familiar pythonesque name for converting a string to a Preserves Value.


Last update: March 16, 2023
Created: March 16, 2023