Passing python dictionary to a class changes the value of dictionary
This question already has an answer here:
一般来说,您需要将字典的副本传递给您的班级 - 或者您可以在班内复印一份副本......
self.myDict = myDict.copy()
链接地址: http://www.djcxy.com/p/20846.html
上一篇: 重点是什么?
下一篇: 将Python字典传递给类会改变字典的值