結果 : check if object has a method python