T
tekion
All,
I have file name A.py with a class name Aclass. I have a file name
B.py with sub class of Aclass, like
import A
class Bclass(Aclass)
....rest of code
When I test it, calling B.py, I am getting:
class Bclas(Aclass):
NameError: name 'Aclass' is not defined
When I move Bclass to A.py, it works. Is there some restriction in
python that sub classing a class has be in the same file as the class
you're are sub classing? Thanks.
I have file name A.py with a class name Aclass. I have a file name
B.py with sub class of Aclass, like
import A
class Bclass(Aclass)
....rest of code
When I test it, calling B.py, I am getting:
class Bclas(Aclass):
NameError: name 'Aclass' is not defined
When I move Bclass to A.py, it works. Is there some restriction in
python that sub classing a class has be in the same file as the class
you're are sub classing? Thanks.