檢查類別成員是否存在 === `hasattr(類別實例, 類別成員名稱)` ## Ref. [How to check if an attribute exists in an object in Python](https://www.kite.com/python/answers/how-to-check-if-an-attribute-exists-in-an-object-in-python) ###### tags: `語法相關`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up