I understand why putting mutable objects in a dictionary is dangerous. However, converting all lists/sets to tuples/frozensets is expensive; and for many types, there\'s no
The output from pickle is not guaranteed to be canonical for similar reasons to dict and set order being non-deterministic. Don't use pickle or pprint or repr for hashing.