cache.py 文件源码

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

项目:odoo-rpc-client 作者: katyukha 项目源码 文件源码
def get_ids_to_read(self, *fields):
        """ Return list of ids, that have no at least one of specified
            fields in cache

            For example::

                cache.get_ids_to_read('name', 'country_id', 'parent_id')

            This code will traverse all record ids managed by this cache,
            and find those that have no at least one field in cache.
            This is highly useful in prefetching
        """
        return [key for key, val in six.viewitems(self)
                if any(((field not in val) for field in fields))]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号