7小时前 · software 何时在 Python 中使用 getattr 基本思想 通常,你可以这样访问属性:python p.name 这只有在编码时已知属性名时才有效。getattr 让你能够……