详见文章
https://www.cnblogs.com/0xiasandu/p/11375980.html
1. hasattr(obj,"func")
2. getattr(obj,"name")
3. setattr(obj,"name","三太子")
4. delattr(obj,"age")
详见文章
https://www.cnblogs.com/0xiasandu/p/11375980.html
1. hasattr(obj,"func")
2. getattr(obj,"name")
3. setattr(obj,"name","三太子")
4. delattr(obj,"age")
本文标题:反射的简单应用
本文链接:https://www.haomeiwen.com/subject/fazjsctx.html
网友评论