frozendict

»

Ever want to use a mapping as a key in a dict or an element in a set? Me too. Unfortunately, Python doesn't have a built-in mapping type that satisfies this requirement. Fortunately, it's simple to do it: