Assume we have two files "a.py" and "b.py"
a.py
from b import funcB
funcB()
b.py
varB = 123
def funcB():
print(varB)
As you see in "a.py", I importing from "b" ONLY "funcB", after that I execute "funcB" in "a", but some how "funcB" CAN SEE "varB" defined in "b". But I have ONLY imported "funcB". I thought "from b import funcB" would ONLY import "funcB" and nothing else.
Why can "funcB" access "varB"? Is that is some kind of design decision?
Thanks