Avatar ·

字典的键可以是什么值?

📁 python, 错误

文档说明,只有不可变数据类型才能作为键。为什么在这个例子中没有报错?

class Test:    passt = Test()print({t: 1})