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)
这样可以吗
4 回答4.4k 阅读✓ 已解决
1 回答3.1k 阅读✓ 已解决
4 回答3.8k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
1 回答4.4k 阅读✓ 已解决
1 回答3.9k 阅读✓ 已解决
1 回答2.8k 阅读✓ 已解决
可以的,并没有规定参数不能用一个实例,只要你保证在Bclass中的方法不会发生TypeError