Oct-12-2018, 12:05 PM
I suspect that the class A is in a file named a.py and the class B is in a file named b.py, right?
remove the . infront of the a and b. What it does right now is that it looks in the __main__ module where it doesn't find the files a and b. Where did you place the files? Are they in the same directory? If so, just write:
remove the . infront of the a and b. What it does right now is that it looks in the __main__ module where it doesn't find the files a and b. Where did you place the files? Are they in the same directory? If so, just write:
from a import A class B(A) def bar(self): print('B.bar')