Can I call a function nested inside another function from the global scope in python3.2?
def func1():
def func2():
print(\"Hello\")
retur
def func1():
def func2():
global fudu
fudu = func2
print("Hello")
func2()
func1()
fudu()
print 'fudu' in dir()
print 'func2' in dir()
result
Hello
Hello
True
False
Also:
def func1():
global func2
def func2():
print("Hello")
func2()
func1()
print 'func2' in dir()
func2()
result
Hello
True
Hello
What's the interest?