I try to understand how python works and I need a small explanation.
So I wrote a very short example and I have trouble understanding why it doesn't work.
I create a test.py
:
def a():
print('a() try to call non existing b()')
b()
At this stage, if I write in a python shell
>>> import test
>>> test.a()
It doesn't work and it is normal because b()
is unknown.
But when I write these following lines, it still not work.
>>> import test
>>> def b():
... print('b()')
...
>>> test.a()
A function in a python module can only call a function in the current module and imported modules ?