You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+10
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,16 @@ as keyword arguments to several ``dill`` functions:
117
117
remote system which does not have the original file on disk. Options are
118
118
*HANDLE_FMODE* for just the handle, *CONTENTS_FMODE* for the file content
119
119
and *FILE_FMODE* for content and handle.
120
+
* with *deterministic=True*, dill will try to make pickles more likely to
121
+
be the same if an object is pickled multiple times. Currently, here is
122
+
the feature set:
123
+
*`set` and `frozenset` will be sorted before being pickled.
124
+
* Subclasses of `set` and `frozenset` will not be effected (and will remain nondeterministic) because they can implement their own `__reduce__` functions which don't have to follow the conventions of `set`'s pickling procedure.
125
+
* If the elements are incomparable (e.g. `complex`), they will be sorted by their hash instead. This will not create a natural order of elements that is easy to understand, but if the `__hash__` function of the class doesn't depend on `id`, it will be deterministic.
126
+
* If using the faster cPickle based pickler outlined in [#485](https://github.com/uqfoundation/dill/issues/485), this feature may be disabled.
127
+
*`dict` and subclasses will remain pickled in insertion order.
128
+
* Entries in global variable dictionaries will be in order for each function. The dictionary as a whole, however, will be ordered in visitation order by function and will not be sorted in alphabetical order. This will mean that the globals dictionaries will be deterministic given that the visitation order of functions is deterministic.
129
+
* This feature is guaranteed.
120
130
* with *ignore=False*, objects reconstructed with types defined in the
121
131
top-level script environment use the existing type in the environment
122
132
rather than a possibly different reconstructed type.
0 commit comments