pymel.core.general.hasAttr

hasAttr(pyObj, attr, checkShape=True)

convenience function for determining if an object has an attribute. If checkShape is enabled, the shape node of a transform will also be checked for the attribute.

Return type:bool