Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python3 check if object has attribute

try:
    doStuff(a.property)
except AttributeError:
    otherStuff()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #object #attribute
ADD COMMENT
Topic
Name
5+9 =