classmethod&staticmethod, shallow copy

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

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

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

posted @ 2019-04-17 14:12  lily19  阅读(97)  评论(0编辑  收藏  举报