假设我有两个类:
class A():
pass
class B():
pass
我还有一堂课
class C(object):
def __init__(self, cond):
if cond ==True:
# class C initialize with class A
else:
# class C initialize with class B
如果我从 A 或 B 继承,通过这种实现是否可能?