给定函数内的函数,如何从外部函数调用内部函数?
前任。
def a():
print 'a'
def b():
print 'b'
def c():
print 'c'
def d():
# how would I now call a, b and c from here?
def e():
# how would I call a, b and c from here as well?
是的,我知道这是可怕的代码结构,不应该这样做——但你是怎么做到的?
编辑:有什么方法可以使用装饰器来做到这一点?