__str__和__repr__的理解
类1,一张扑克 class Card(object): # 一张牌 def __init__(self, color, point): self._color = color self._point = point def __str__(self): print("str", end=",") return self._color + str(self._point) def __repr__(self): print("repr", end=",") if se
下载地址
用户评论