結果 : check if instance has attribute python