Python 我收到一个无效的语法错误,上面写着value=self.amt
您忘记了在Python 我收到一个无效的语法错误,上面写着value=self.amt,python,Python,您忘记了在.format() class Gold(Item): def __init__(self, amt): self.amt = amt super().__init__(name="Gold", description="A round coin with {} stamped on the front.".format(str(self.amt))
.format()
class Gold(Item):
def __init__(self, amt):
self.amt = amt
super().__init__(name="Gold",
description="A round coin with {} stamped on the front.".format(str(self.amt))
value=self.amt)