如何知道对象在Python中是否具有属性
>>> a = SomeClass()>>> a.someProperty = value>>> a.propertyTraceback (most recent call last): File "<stdin>", line 1, in <module>AttributeError: SomeClass instance has no attribute 'property'
aproperty
呼如林
手掌心
随时随地看视频慕课网APP
相关分类