In this question, it was suggested that calling repr on a dictionary would be a good way to store it in another dictionary. This would depend on repr being the same regardless of how the keys are ordered. Is this the case?
PS. the most elegant solution to the original problem was actually using frozenset