📜  python缓存返回值 - Python代码示例

📅  最后修改于: 2022-03-11 14:45:52.722000             🧑  作者: Mango

代码示例1
from functools import cache

@cache
def factorial(n):
    return n * factorial(n-1) if n else 1