- 博客(2)
- 收藏
- 关注
转载 子类替换了父类方法
子类继承父类,但子类新建方法与父类原有方法名称相同。如果想让父类方法被被替用,两个方法同时生效,使用super().方法即可。如super().__init__()
2018-03-23 14:24:57
713
原创 TypeError: find_imfor() takes 0 positional arguments but 1 was given
代码如下: __author__ = 'chester' class Customer(): name='' balance=0 def find_imfor(): print('name:' + name) print('balance:' + str(balance)) customer=Customer() customer.find
2018-01-30 19:52:25
2249
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人