会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
韩增
博客园
首页
新随笔
联系
管理
订阅
2020年4月15日
Python 内存缓存
摘要: python标准库中的functools模块,提供了functools.lru_cache,基于内存的缓存。 from functools import lru_cache @lru_cache(maxsize=1)def sum2(a,b): print(f"计算{a}+{b} ... ") re
阅读全文
posted @ 2020-04-15 16:25 韩增
阅读(4292)
评论(4)
推荐(1)
公告