我对以下概念并不陌生:
TypeError: unhashable type: 'OrderedDict'
但我无法理解以下代码行如何产生这样的堆栈跟踪。
89: @staticmethod
90: def diff(var1, var2, path=[], level=0, curpath=[]):
...
101: elif isinstance(var1, list) and isinstance(var2, list):
102: l1s = set(var1)
103: l2s = set(var2)
104: retlist = []
File "myFile.py", line 102, in diff
l1s = set(var1)
TypeError: unhashable type: 'OrderedDict'
line 102
, 在上面的代码中如何抛出这样的异常?