Suppose I use some 3rd party module that depends on code from another one:
# third_party.py
from package import fun, A
class B(A):
def foo(self):
self.do()
self.some()
self.stuff()
return fun(self)
And then I want to inherit this class in my code to change functionality:
# my_code.py
from third_party import B
# from third_party import fun?
# from package import fun?
class C(B):
def foo(self):
return fun(self)
What is better: from package import fun or from third_party import fun to get access to fun?
I like second variant since I may do not bother with actual paths and import all dependences from third_party package, but has this way any drawbacks? Is this a good or bad practice?
Thanks!