faaclib.py 文件源码

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

项目:FCParser 作者: josecamachop 项目源码 文件源码
def equals(self, raw_value):
        """Compares this IP address to a given one, OR
        Checks this IP address matchtype.
        Suported matchtypes: 'private', 'public'.

        raw_value -- Specific IP address, OR matchtype of IP.
        """
        if self.value is None:
            output = False
        elif raw_value == 'private':
            output = (self.value.iptype() == 'PRIVATE')
        elif raw_value == 'public':
            output = (self.value.iptype() == 'PUBLIC')
        else:
            value = self.load(raw_value)
            output = (self.value == value)

        return output
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号