book_policy.py 文件源码

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

项目:tm-librarian 作者: FabricAttachedMemory 项目源码 文件源码
def __call__(self, books_needed):
        '''Look up the appropriate routine or throw an error'''
        self.LCEobj.errno = errno.ENOSYS
        try:
            policy_func = self.__class__.__dict__['_policy_' + self.name]
            return policy_func(self, books_needed)
        except KeyError as e:
            # AssertionError is a "gentler" reporting path back to user
            raise AssertionError('"%s" is not implemented' % self.name)

###########################################################################
# This is NOT for testing, just a quick entry without the full Librarian.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号