結果 : get attribute if exists python