if hasattr(a, 'property'):
a.property
如何确定一个对象是否含有某个属性?
最新推荐文章于 2024-03-19 09:32:20 发布
if hasattr(a, 'property'):
a.property