classmethod&staticmethod, shallow copy

classmethod: 函数对本类进行处理
staticmethod: 函数不对本类里面的参数作处理python

https://www.programiz.com/python-programming/methods/built-in/staticmethod
https://www.programiz.com/python-programming/methods/built-in/classmethod

浅复制: 对于不可变对象会开辟新空间,可变对象直接引用函数

相关文章
相关标签/搜索