反射

getattr

hasattr

原文地址:https://www.cnblogs.com/Majintao/p/9721192.html