摘要: 原理 用栈模拟递归,用到了生成器和装饰器的概念 # 生成器对象 from types import GeneratorType # 装饰器 手写栈 def bootstrap(f, stack=[]): # AOP def wrappedfunc(*args, **kwargs): if stack 阅读全文