代码拉取完成,页面将自动刷新
#!usr/bin/env python
# -*- coding:utf-8 -*-
# Author:Ma Ping
class A():
def __init__(self):
self.name = 'Aname'
def go(self):
print('a go a')
class B():
def go(self):
#super(B, self).go()
print('b go b')
class C(A):
def go(self):
super(C, self).go() #python2 and python3
print('c go c')
class D(B,A):
def __init__(self):
super(D, self).__init__()
self.age = 'Dage'
def go(self):
super().go() #python3
print('d go d')
#b = B()
d = D()
#b.go()
d.go()
print(d.name,d.age)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。