odict.py 文件源码

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

项目:PocHunter 作者: DavexPro 项目源码 文件源码
def __setattr__(self, name, value):
        """
        Implemented so that accesses to ``sequence`` raise a warning and are
        diverted to the new ``setkeys`` method.
        """
        if name == 'sequence':
            warnings.warn('Use of the sequence attribute is deprecated.'
                ' Use the keys method instead.', DeprecationWarning)
            # NOTE: doesn't return anything
            self.setkeys(value)
        else:
            # FIXME: do we want to allow arbitrary setting of attributes?
            #   Or do we want to manage it?
            object.__setattr__(self, name, value)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号