Answers for "how to check attribute of an object in python"

3

python3 check if object has attribute

try:
    doStuff(a.property)
except AttributeError:
    otherStuff()
Posted by: Guest on February-08-2020
0

check object attributes python

rofl = NewObject()
dir(rofl) // <-- show all of the available attributes that object has
Posted by: Guest on June-22-2021

Code answers related to "how to check attribute of an object in python"

Python Answers by Framework

Browse Popular Code Answers by Language