一些语法

def changePrice(self,newPrice):
if type(newPrice) is int:
self.__price = newPrice
else:
print("本次价格修改不成功")
原文地址:https://www.cnblogs.com/chris-jia/p/9557658.html