grammar.py 文件源码

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

项目:qiime2 作者: qiime2 项目源码 文件源码
def __init__(self, name, mapping):
        if type(mapping) is not dict:  # we really only want dict literals
            raise ValueError()

        if type(name) is not str:
            raise ValueError()

        for key in mapping:
            self._validate_member_(key)
        for value in mapping.values():
            self._validate_member_(value)
        # Read only proxy of mapping, mutation to `mapping` will be reflected
        # but there isn't much we can do about that. Good use of this object
        # would involve a dict literal anyway.
        self.mapping = types.MappingProxyType(mapping)

        super().__init__(name)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号