我得到“unhashable”错误,当我做了以下内容:“表%制造者%”如何赋值键
a = {}
a["wer":"table.%%maker%%"]
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
a["wer":"table.%%maker%%"]
TypeError: unhashable type
“WER”键应有的价值在这里,但我不能插入百分号。我应该怎么做?
我花了一些时间才弄清楚_actually_发生了什么ERE。 –
相关:[为什么Python会引发TypeError而不是SyntaxError?](http://stackoverflow.com/q/4157278/20862) –
这与百分比符号无关! a [2:3]给出相同的错误。 –