How do I pickle a “memoized” Python function?

前端 未结 0 818
梦谈多话
梦谈多话 2021-02-14 17:25

I have the following code:

def f(input,MEM={}):
    if len(MEM) == 0:
        with open(\'dill.pkl\', \'rb\') as f:
            MEM = dill.load(\'dill.pkl\')
             


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题