The hasattr() method returns true if an object has the given named attribute and false if it does not.
# hasattr(object,name)
class FPGA:
dev_type = "arria"
dev_pack = "fbga"
a=FPGA()
hasattr(a,'dev_type')
The hasattr() method returns true if an object has the given named attribute and false if it does not.
# hasattr(object,name)
class FPGA:
dev_type = "arria"
dev_pack = "fbga"
a=FPGA()
hasattr(a,'dev_type')