utils.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:antgo 作者: jianzfb 项目源码 文件源码
def __call__(self, *args):
    if not isinstance(args, collections.Hashable):
      # uncacheable. a list, for instance.
      # better to not cache than blow up.
      return self.func(*args)
    if args in self.cache:
      return self.cache[args]
    else:
      value = self.func(*args)
      self.cache[args] = value
      return value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号