在类中使用——getattr(self, attr):
https://www.cnblogs.com/laoyulaoyu/p/7073606.html
普通使用——getattr(object, attr):
https://www.runoob.com/python/python-func-getattr.html
python中的getattr()方法——获取对象属性
最新推荐文章于 2024-04-19 07:00:00 发布
在类中使用——getattr(self, attr):
https://www.cnblogs.com/laoyulaoyu/p/7073606.html
普通使用——getattr(object, attr):
https://www.runoob.com/python/python-func-getattr.html