結果 : how to check if a class has an attribute python