l1nkkk
2017-06-14 11:34python3中,继承构造函数问题
class a(object):
def __init__(self):
print("a")
class b(a):
def __init__(self):
super().__init__()
print("b")
pass
class c(a):
def __init__(self):
super().__init__()
print('c')
class d(b,c):
pass
mm = d()
结果为什么是
a
c
b
- 点赞
- 回答
- 收藏
- 复制链接分享
3条回答
为你推荐
- 无法解析的外部命令,大佬们看看函数没有实现吗??继承的问题
- java
- c语言
- 开发语言
- c++
- python
- 1个回答
- 通过随机森林和geatpy进行遗传算法测试,但是迭代没有效果
- 机器学习
- 1个回答
- 如何卸载assembly?或者class
- net
- c#
- 0个回答
- python3中,继承构造函数问题
- python
- 3个回答