And, if you don't like my addition, at least make it explicit in your docstring that your argument values must be hashable (and in particular no lists and no dicts).