|

楼主 |
发表于 2016-9-8 17:48:10
|
显示全部楼层
- Traceback (most recent call last):
- File "C:/Users/Administrator/Desktop/sss.py", line 12, in <module>
- print(b.bb())
- File "C:/Users/Administrator/Desktop/sss.py", line 9, in bb
- A.aa(self)
- TypeError: unbound method aa() must be called with A instance as first argument (got B instance instead)
复制代码
运行后 报这个错
sss.py:
- #-*- coding:utf-8 -*-
- from ttt import A
- # import t1.A
- class B:
- def bb(self):
-
- A.aa()
- b = B()
- print(b.bb())
复制代码
tt.py:
- #-*- coding:utf-8 -*-
- class A:
- def aa(self):
- a = list[1,2]
- return a
复制代码
|
|