Suppose I have a file called which reads like this:
class A:
    def __init__(self, foo): = foo = bar(foo)
class B(A):
class C(B):
def bar(foo):
    return foo + 1

Suppose in another file in the same directory, I have another python program.

from randomFile import C

# some code

When C has to be imported, B also has to be imported because it is the parent. Therefore, A also has to be imported. This also results in the function bar being imported. When from ... import ... is called, does Python follow all the references and import everything that is needed, or does it just import the whole namespace (making wildcard imports acceptable :O)?

-Surya Subbarao