data_objects.py 文件源码

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

项目:umongo 作者: Scille 项目源码 文件源码
def __eq__(self, other):
        if isinstance(other, self.document_cls):
            return other.pk == self.pk
        elif isinstance(other, Reference):
            return self.pk == other.pk and self.document_cls == other.document_cls
        elif isinstance(other, DBRef):
            return self.pk == other.id and self.document_cls.collection.name == other.collection
        return NotImplemented
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号