a = Aclass()
class Bclass(object):
def __init__(self, a):
pass
b = Bclass(a)
这样可以吗
a = Aclass()
class Bclass(object):
def __init__(self, a):
pass
b = Bclass(a)
这样可以吗
2 回答5.1k 阅读✓ 已解决
2 回答1.1k 阅读✓ 已解决
4 回答1.4k 阅读✓ 已解决
3 回答1.3k 阅读✓ 已解决
3 回答1.2k 阅读✓ 已解决
1 回答1.7k 阅读✓ 已解决
1 回答1.2k 阅读✓ 已解决
可以的,并没有规定参数不能用一个实例,只要你保证在Bclass中的方法不会发生TypeError