python获取连续属性 2019-08-02 本文已影响0人 zhenggeaza 1、 getattr(getattr(a, "b"), "c") 2、 import operator operator.attrgetter("b.c")(a)