def __repr__(self): s = 'Point(' + str(self.x) + ', ' s += str(self.y) + ')' return s ... 為了便於顯示其差異,在本例中,__repr__方法回傳一個較長的顯示字串。
確定! 回上一頁