https://www.cnblogs.com/linhaifeng/articles/6113086.html
——————————————————————————————————————
六、前向引用之'函数即变量'
def foo(): print('from foo') bar() foo()
运行结果:
NameError: name 'bar' is not defined
def foo(): print('from foo') bar() def bar(): print('from bar') foo()
运行结果:
from foo
from bar
def foo(): print('from foo') bar() foo() def bar(): print('from bar')
运行结果:
NameError: name 'bar' is not defined
from foo